Code

fix warning when creating a mask which is the first item in defs
authorbuliabyak <buliabyak@users.sourceforge.net>
Sat, 3 Mar 2007 06:33:55 +0000 (06:33 +0000)
committerbuliabyak <buliabyak@users.sourceforge.net>
Sat, 3 Mar 2007 06:33:55 +0000 (06:33 +0000)
src/sp-mask.cpp

index 9c8b0ba3251128f3e436b3dbbfd3249623c484c3..64ff38019d381b915b2f64cc952454be6110c450 100644 (file)
@@ -293,7 +293,8 @@ sp_mask_create (GSList *reprs, SPDocument *document, NR::Matrix const* applyTran
         }
     }
 
-    defsrepr->changeOrder(repr, defsrepr->lastChild()); // workaround for bug 989084
+    if (repr != defsrepr->lastChild())
+        defsrepr->changeOrder(repr, defsrepr->lastChild()); // workaround for bug 989084
     
     Inkscape::GC::release(repr);
     return mask_id;