From: buliabyak Date: Wed, 30 Jul 2008 22:18:14 +0000 (+0000) Subject: fix crash when deleting whitespace in start of flowtext X-Git-Url: https://git.tokkee.org/?a=commitdiff_plain;h=e555ddae73c3724d3204489d5bbe9ebc0a8fd861;p=inkscape.git fix crash when deleting whitespace in start of flowtext --- diff --git a/src/text-editing.cpp b/src/text-editing.cpp index 3c4b4da8e..d28939774 100644 --- a/src/text-editing.cpp +++ b/src/text-editing.cpp @@ -1669,10 +1669,14 @@ static bool tidy_operator_styled_whitespace(SPObject **item) for ( ; ; ) { // go up one item in the xml test_item = SP_OBJECT_PARENT(test_item); if (is_line_break_object(test_item)) break; - SPObject *next = SP_OBJECT_NEXT(test_item); - if (next) { - test_item = next; - break; + if (test_item) { + SPObject *next = SP_OBJECT_NEXT(test_item); + if (next) { + test_item = next; + break; + } + } else { + return false; } } if (is_line_break_object(test_item)) { // no next string, see if there's a prev string