From c35e882b037453a735cc6fbbd6b4475cf5afe602 Mon Sep 17 00:00:00 2001 From: buliabyak Date: Sun, 4 Oct 2009 15:42:39 +0000 Subject: [PATCH] Richard's patch for crash bug 402274 --- src/text-editing.cpp | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/text-editing.cpp b/src/text-editing.cpp index 5b9db13d4..2bdee4c10 100644 --- a/src/text-editing.cpp +++ b/src/text-editing.cpp @@ -1547,8 +1547,9 @@ static bool redundant_double_nesting_processor(SPObject **item, SPObject *child, if (!objects_have_equal_style(SP_OBJECT_PARENT(*item), child)) return false; Inkscape::XML::Node *insert_after_repr; - if (prepend) insert_after_repr = SP_OBJECT_REPR(SP_OBJECT_PREV(*item)); - else insert_after_repr = SP_OBJECT_REPR(*item); + if (!prepend) insert_after_repr = SP_OBJECT_REPR(*item); + else if (SP_OBJECT_PREV(*item)) insert_after_repr = SP_OBJECT_REPR(SP_OBJECT_PREV(*item)); + else insert_after_repr = NULL; while (SP_OBJECT_REPR(child)->childCount()) { Inkscape::XML::Node *move_repr = SP_OBJECT_REPR(child)->firstChild(); Inkscape::GC::anchor(move_repr); -- 2.30.2