summaryrefslogtreecommitdiffstats
path: root/src/sp-lpe-item.cpp
diff options
context:
space:
mode:
authorJabier Arraiza Cenoz <jabier.arraiza@marker.es>2017-05-30 14:46:49 +0000
committerjabiertxof <info@marker.es>2017-05-30 14:46:49 +0000
commit2ed5e722d04f65eea0adfee9cea46ba65abda65b (patch)
tree6454df66708ab3727800ff1ea53541a6c2cc2ee0 /src/sp-lpe-item.cpp
parentcmake/MSYS2: install python2-pillow (diff)
downloadinkscape-2ed5e722d04f65eea0adfee9cea46ba65abda65b.tar.gz
inkscape-2ed5e722d04f65eea0adfee9cea46ba65abda65b.zip
Fix bug pointed by parclytaxel in IRC
(bzr r15718)
Diffstat (limited to 'src/sp-lpe-item.cpp')
-rw-r--r--src/sp-lpe-item.cpp5
1 files changed, 2 insertions, 3 deletions
diff --git a/src/sp-lpe-item.cpp b/src/sp-lpe-item.cpp
index be886bdd2..1333642e9 100644
--- a/src/sp-lpe-item.cpp
+++ b/src/sp-lpe-item.cpp
@@ -555,19 +555,18 @@ void SPLPEItem::removeAllPathEffects(bool keep_paths)
return;
}
}
- for (PathEffectList::const_iterator it = path_effect_list->begin(); it != path_effect_list->end(); ++it)
- {
+ while ( it != this->path_effect_list->end() ) {
LivePathEffectObject *lpeobj = (*it)->lpeobject;
if (lpeobj) {
Inkscape::LivePathEffect::Effect * lpe = lpeobj->get_lpe();
lpe->keep_paths = keep_paths;
lpe->doOnRemove(this);
}
+ // unlink and delete all references in the list
(*it)->unlink();
delete *it;
it = this->path_effect_list->erase(it);
}
-
this->getRepr()->setAttribute("inkscape:path-effect", NULL);
if (!keep_paths) {