Code

Enable simultaneous knotholder and nodepath
[inkscape.git] / src / knot-holder-entity.cpp
index a587a3af0cef1c4fe19bcc73102a0e1842a57da6..e2ae5f10e663e3084070fe37e737b760934d5df5 100644 (file)
@@ -56,7 +56,13 @@ KnotHolderEntity::create(SPDesktop *desktop, SPItem *item, KnotHolder *parent, c
 KnotHolderEntity::~KnotHolderEntity()
 {
     /* unref should call destroy */
-    g_object_unref(knot);
+    if (knot) {
+        g_object_unref(knot);
+    } else {
+        // FIXME: This shouldn't occur. Perhaps it is caused by LPE PointParams being knotholder entities, too
+        //        If so, it will likely be fixed with upcoming refactoring efforts.
+        g_return_if_fail(knot);
+    }
 }
 
 void