Code

delivarotify picking; restore the old pick code, fix it to work with stroke width...
[inkscape.git] / src / sp-object.cpp
index 9294a2e9f442c9f83f6f9bbc1f2c49587139b56c..9b6c249172b18839ebd50548171d2c55132f08a4 100644 (file)
@@ -737,8 +737,9 @@ sp_object_remove_child(SPObject *object, Inkscape::XML::Node *child)
 {
     debug("id=%x, typename=%s", object, g_type_name_from_instance((GTypeInstance*)object));
     SPObject *ochild = sp_object_get_child_by_repr(object, child);
-    g_return_if_fail(ochild != NULL);
-    sp_object_detach(object, ochild);
+    g_return_if_fail (ochild != NULL || !strcmp("comment", child->name())); // comments have no objects
+    if (ochild)
+        sp_object_detach(object, ochild);
 }
 
 /**