Code

Fix Bug #675309 - crash when unlinking an orphaned clone
[inkscape.git] / src / selection-chemistry.cpp
index 61db7f9610cbac5a5e5514f05151177ade4c1134..6786479d6230bda78540ff89461b2c80f323141e 100644 (file)
@@ -2150,6 +2150,11 @@ sp_selection_unlink(SPDesktop *desktop)
         SPItem *unlink;
         if (SP_IS_USE(item)) {
             unlink = sp_use_unlink(SP_USE(item));
+            // Unable to unlink use (external or invalid href?)
+            if (!unlink) {
+                new_select = g_slist_prepend(new_select, item);
+                continue;
+            }
         } else /*if (SP_IS_TREF(use))*/ {
             unlink = SP_ITEM(sp_tref_convert_to_tspan(item));
         }