summaryrefslogtreecommitdiffstats
path: root/src/path-chemistry.cpp
diff options
context:
space:
mode:
authorMarc Jeanmougin <marc@jeanmougin.fr>2015-05-07 22:12:09 +0000
committerMarc Jeanmougin <marcjeanmougin@free.fr>2015-05-07 22:12:09 +0000
commita06c4852edb10e38fce19fd2df3833c03b6a15e4 (patch)
treeeeaf2609e71a71657eab53b23a0196d3500b930c /src/path-chemistry.cpp
parentExporting. Fix for Bug #1452560 (Rectangles missing from saved SIF). (diff)
downloadinkscape-a06c4852edb10e38fce19fd2df3833c03b6a15e4.tar.gz
inkscape-a06c4852edb10e38fce19fd2df3833c03b6a15e4.zip
fix crash when converting a group of objects to path
(bzr r14121)
Diffstat (limited to 'src/path-chemistry.cpp')
-rw-r--r--src/path-chemistry.cpp8
1 files changed, 6 insertions, 2 deletions
diff --git a/src/path-chemistry.cpp b/src/path-chemistry.cpp
index 8d2695b85..98148b916 100644
--- a/src/path-chemistry.cpp
+++ b/src/path-chemistry.cpp
@@ -388,7 +388,9 @@ sp_item_list_to_curves(const std::vector<SPItem*> &items, std::vector<SPItem*>&
if (repr) {
to_select.insert(to_select.begin(),repr);
did = true;
- selected.erase(find(selected.begin(),selected.end(),item));
+ std::vector<SPItem*>::iterator element=find(selected.begin(),selected.end(),item);
+ if(element != selected.end())
+ selected.erase(find(selected.begin(),selected.end(),item));
}
continue;
@@ -413,7 +415,9 @@ sp_item_list_to_curves(const std::vector<SPItem*> &items, std::vector<SPItem*>&
continue;
did = true;
- selected.erase(find(selected.begin(),selected.end(),item));
+ std::vector<SPItem*>::iterator element=find(selected.begin(),selected.end(),item);
+ if(element != selected.end())
+ selected.erase(element);
// remember the position of the item
gint pos = item->getRepr()->position();