summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: f83661e)
raw | patch | inline | side by side (parent: f83661e)
author | Krzysztof Kosiński <tweenk.pl@gmail.com> | |
Thu, 18 Feb 2010 00:34:15 +0000 (01:34 +0100) | ||
committer | Krzysztof Kosiński <tweenk.pl@gmail.com> | |
Thu, 18 Feb 2010 00:34:15 +0000 (01:34 +0100) |
src/ui/tool/path-manipulator.cpp | patch | blob | history |
index 13f1448b93997984ca3188968a154461274118a3..82fe5344026a443e447f0b823cde9067f7e8c070 100644 (file)
// so that _updateDragPoint doesn't crash on paths with naked movetos
Geom::PathVector pathv = pathv_to_linear_and_cubic_beziers(_spcurve->get_pathvector());
for (Geom::PathVector::iterator i = pathv.begin(); i != pathv.end(); ) {
+ // NOTE: this utilizes the fact that Geom::PathVector is an std::vector.
+ // When we erase an element, the next one slides into position,
+ // so we do not increment the iterator even though it is theoretically invalidated.
if (i->empty()) {
- pathv.erase(i++);
+ pathv.erase(i);
} else {
++i;
}