From d3effc021b689e27bedd926c5dca990aba988c04 Mon Sep 17 00:00:00 2001 From: "Johan B. C. Engelen" Date: Tue, 23 Sep 2008 21:38:42 +0000 Subject: remove lpeobject_ref when invalid lpe name (bzr r6874) --- src/sp-lpe-item.cpp | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'src/sp-lpe-item.cpp') 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; } } } -- cgit v1.2.3