summaryrefslogtreecommitdiffstats
path: root/src/sp-filter.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/sp-filter.cpp')
-rw-r--r--src/sp-filter.cpp11
1 files changed, 5 insertions, 6 deletions
diff --git a/src/sp-filter.cpp b/src/sp-filter.cpp
index 052fa7fe2..2a5ec0755 100644
--- a/src/sp-filter.cpp
+++ b/src/sp-filter.cpp
@@ -267,19 +267,18 @@ Inkscape::XML::Node* SPFilter::write(Inkscape::XML::Document *doc, Inkscape::XML
repr = doc->createElement("svg:filter");
}
- GSList *l = NULL;
+ std::vector<Inkscape::XML::Node *> l;
for (auto& child: children) {
Inkscape::XML::Node *crepr = child.updateRepr(doc, NULL, flags);
if (crepr) {
- l = g_slist_prepend (l, crepr);
+ l.push_back(crepr);
}
}
- while (l) {
- repr->addChild((Inkscape::XML::Node *) l->data, NULL);
- Inkscape::GC::release((Inkscape::XML::Node *) l->data);
- l = g_slist_remove (l, l->data);
+ for (auto i=l.rbegin();i!=l.rend();++i) {
+ repr->addChild(*i, NULL);
+ Inkscape::GC::release(*i);
}
} else {
for (auto& child: children) {