From: johanengelen Date: Tue, 23 Sep 2008 21:38:42 +0000 (+0000) Subject: remove lpeobject_ref when invalid lpe name X-Git-Url: https://git.tokkee.org/?a=commitdiff_plain;h=4db19887d097356c946080d0e7e9002402308837;p=inkscape.git remove lpeobject_ref when invalid lpe name --- diff --git a/src/sp-lpe-item.cpp b/src/sp-lpe-item.cpp index 89d41be76..2b0379cd4 100644 --- a/src/sp-lpe-item.cpp +++ b/src/sp-lpe-item.cpp @@ -217,6 +217,11 @@ sp_lpe_item_set(SPObject *object, unsigned int key, gchar const *value) if (path_effect_ref && path_effect_ref->lpeobject && path_effect_ref->lpeobject->lpe) { lpeitem->path_effect_list->push_back(path_effect_ref); + } else { + // something has gone wrong in finding the right patheffect. For example when the specified LPE name does not exist. + path_effect_ref->unlink(); + delete path_effect_ref; + path_effect_ref = NULL; } } }