summaryrefslogtreecommitdiffstats
path: root/src/text-editing.cpp
diff options
context:
space:
mode:
authorTed Gould <ted@gould.cx>2009-11-29 19:51:36 +0000
committerTed Gould <ted@gould.cx>2009-11-29 19:51:36 +0000
commit51a880db854a5959378d755b3049a168f634c071 (patch)
treeac1d51963375f9cbb14a730153447b01e981b620 /src/text-editing.cpp
parentadding iffdefs for LCMS and fixing layout of CMS icons (diff)
parentDeprecation warning fix on xcf export (diff)
downloadinkscape-51a880db854a5959378d755b3049a168f634c071.tar.gz
inkscape-51a880db854a5959378d755b3049a168f634c071.zip
Updating to current trunk
(bzr r8050.1.16)
Diffstat (limited to 'src/text-editing.cpp')
-rw-r--r--src/text-editing.cpp5
1 files 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);