From: buliabyak Date: Sat, 21 Jan 2006 03:45:50 +0000 (+0000) Subject: fix crash when setting letterspacing at the end of a non-tspanned text X-Git-Url: https://git.tokkee.org/?a=commitdiff_plain;h=81b8841ee7770bfb6f5d544c975e593b462ed02a;p=inkscape.git fix crash when setting letterspacing at the end of a non-tspanned text --- 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);