summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: 135ed17)
raw | patch | inline | side by side (parent: 135ed17)
author | buliabyak <buliabyak@users.sourceforge.net> | |
Sat, 19 Jul 2008 04:33:41 +0000 (04:33 +0000) | ||
committer | buliabyak <buliabyak@users.sourceforge.net> | |
Sat, 19 Jul 2008 04:33:41 +0000 (04:33 +0000) |
src/sp-lpe-item.cpp | patch | blob | history |
diff --git a/src/sp-lpe-item.cpp b/src/sp-lpe-item.cpp
index 229ae326eddcff8c95bd3aa6514db2bdf081da5e..2eecd8e45904b3bf86babb3458c852f487de6b54 100644 (file)
--- a/src/sp-lpe-item.cpp
+++ b/src/sp-lpe-item.cpp
if (((GObjectClass *) (parent_class))->finalize) {
(* ((GObjectClass *) (parent_class))->finalize)(object);
}
-
- delete SP_LPE_ITEM(object)->path_effect_list;
}
/**
@@ -154,12 +152,21 @@ sp_lpe_item_build(SPObject *object, SPDocument *document, Inkscape::XML::Node *r
static void
sp_lpe_item_release(SPObject *object)
{
- SPLPEItem *lpeitem;
- lpeitem = (SPLPEItem *) object;
+ SPLPEItem *lpeitem = (SPLPEItem *) object;
lpeitem->lpe_modified_connection.disconnect();
lpeitem->lpe_modified_connection.~connection();
+ PathEffectList::iterator it = lpeitem->path_effect_list->begin();
+ while ( it != lpeitem->path_effect_list->end() ) {
+ // unlink and delete all references in the list
+ (*it)->unlink();
+ delete *it;
+ it = lpeitem->path_effect_list->erase(it);
+ }
+ // delete the list itself
+ delete SP_LPE_ITEM(object)->path_effect_list;
+
if (((SPObjectClass *) parent_class)->release)
((SPObjectClass *) parent_class)->release(object);
}