diff options
| author | bulia byak <buliabyak@gmail.com> | 2006-01-21 03:45:50 +0000 |
|---|---|---|
| committer | buliabyak <buliabyak@users.sourceforge.net> | 2006-01-21 03:45:50 +0000 |
| commit | a7654d7e42cc34df1403176cc49ee2ef2b819a94 (patch) | |
| tree | 19e970c9869e0b4b5dcad2fa74a9ec5545d7ad1a /src | |
| parent | * src/widgets/toolbox.cpp, src/widgets/desktop-widget.cpp, (diff) | |
| download | inkscape-a7654d7e42cc34df1403176cc49ee2ef2b819a94.tar.gz inkscape-a7654d7e42cc34df1403176cc49ee2ef2b819a94.zip | |
fix crash when setting letterspacing at the end of a non-tspanned text
(bzr r19)
Diffstat (limited to 'src')
| -rw-r--r-- | src/text-editing.cpp | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/src/text-editing.cpp b/src/text-editing.cpp index 91182b37f..44450f8fa 100644 --- a/src/text-editing.cpp +++ b/src/text-editing.cpp @@ -879,10 +879,13 @@ sp_te_adjust_tspan_letterspacing_screen(SPItem *text, Inkscape::Text::Layout::it SPObject *source_obj; unsigned nb_let; layout->getSourceOfCharacter(std::min(start, end), (void**)&source_obj); - if (source_obj == NULL) // end of text + + if (source_obj == NULL) { // end of text source_obj = text->lastChild(); - else if (SP_IS_STRING(source_obj)) + } + if (SP_IS_STRING(source_obj)) { source_obj = source_obj->parent; + } SPStyle *style = SP_OBJECT_STYLE (source_obj); |
