From e7136d8c08bc408e060130fb9725a6c8e5b81a45 Mon Sep 17 00:00:00 2001 From: Kris De Gussem Date: Sat, 29 Oct 2011 20:49:27 +0200 Subject: fix usage of iterator when iterator's erase function is used (Bug #812018) Fixed bugs: - https://launchpad.net/bugs/812018 (bzr r10706) --- src/ui/tool/path-manipulator.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/ui/tool/path-manipulator.cpp') diff --git a/src/ui/tool/path-manipulator.cpp b/src/ui/tool/path-manipulator.cpp index 4be8df397..a7369f915 100644 --- a/src/ui/tool/path-manipulator.cpp +++ b/src/ui/tool/path-manipulator.cpp @@ -1006,7 +1006,7 @@ void PathManipulator::_createControlPointsFromGeometry() // 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); + i = pathv.erase(i); } else { ++i; } -- cgit v1.2.3