tools/drawMapTest/drawmapscene.cpp
changeset 4471 220d44cb8659
parent 4457 ffb766e85150
--- a/tools/drawMapTest/drawmapscene.cpp	Mon Dec 06 00:33:39 2010 -0500
+++ b/tools/drawMapTest/drawmapscene.cpp	Mon Dec 06 12:21:12 2010 +0300
@@ -147,7 +147,9 @@
     int i = 1;
     while(i < points.size())
     {
-        if(sqr(prevPoint.x() - points[i].x()) + sqr(prevPoint.y() - points[i].y()) < 1000)
+        if( (i != points.size() - 1)
+            && (sqr(prevPoint.x() - points[i].x()) + sqr(prevPoint.y() - points[i].y()) < 1000)
+          )
             points.removeAt(i);
         else
         {