merge
authorkoda
Thu, 07 Apr 2011 13:21:11 +0200
changeset 5116 d70febb51125
parent 5115 276410cc1178 (current diff)
parent 5108 b7483e29ea8c (diff)
child 5117 71f94af9d1a4
merge
--- a/QTfrontend/drawmapscene.cpp	Thu Apr 07 01:45:38 2011 +0200
+++ b/QTfrontend/drawmapscene.cpp	Thu Apr 07 13:21:11 2011 +0200
@@ -86,14 +86,17 @@
 
 void DrawMapScene::mouseReleaseEvent(QGraphicsSceneMouseEvent * mouseEvent)
 {
-    QPainterPath path = m_currPath->path();
-    path.lineTo(mouseEvent->scenePos());
-    paths.first().append(mouseEvent->scenePos().toPoint());
-    m_currPath->setPath(path);
+    if (m_currPath)
+    {
+        QPainterPath path = m_currPath->path();
+        path.lineTo(mouseEvent->scenePos());
+        paths.first().append(mouseEvent->scenePos().toPoint());
+        m_currPath->setPath(path);
 
-    simplifyLast();
+        simplifyLast();
 
-    m_currPath = 0;
+        m_currPath = 0;
+    }
 }
 
 void DrawMapScene::undo()