From f893425c4e9d23a438fb34b9f4bccd409650d484 Mon Sep 17 00:00:00 2001 From: Marc Jeanmougin Date: Sat, 2 May 2015 21:48:52 +0200 Subject: fix crash when setting clip (bzr r14094) --- src/selection-chemistry.cpp | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) (limited to 'src/selection-chemistry.cpp') diff --git a/src/selection-chemistry.cpp b/src/selection-chemistry.cpp index 68adf5381..f444f4217 100644 --- a/src/selection-chemistry.cpp +++ b/src/selection-chemistry.cpp @@ -3884,17 +3884,18 @@ void sp_selection_set_mask(SPDesktop *desktop, bool apply_clip_path, bool apply_ items_to_select.push_back(*i); } } else { - GSList *i = NULL; - for (std::vector::const_iterator i=items.begin();i!=items.end();i++) { - apply_to_items = g_slist_prepend(apply_to_items, *i); - items_to_select.push_back(*i); + SPItem *i = NULL; + for (std::vector::const_iterator j=items.begin();j!=items.end();j++) { + i=*j; + apply_to_items = g_slist_prepend(apply_to_items, i); + items_to_select.push_back(i); } - Inkscape::XML::Node *dup = SP_OBJECT(i->data)->getRepr()->duplicate(xml_doc); + Inkscape::XML::Node *dup = SP_OBJECT(i)->getRepr()->duplicate(xml_doc); mask_items = g_slist_prepend(mask_items, dup); if (remove_original) { - SPObject *item = reinterpret_cast(i->data); + SPObject *item = reinterpret_cast(i); items_to_delete = g_slist_prepend(items_to_delete, item); } } -- cgit v1.2.3