From f1f96fd3acdbf380fefe5de1d191bdd77017bb06 Mon Sep 17 00:00:00 2001 From: Craig Watson Date: Sat, 23 Sep 2017 15:11:49 -0400 Subject: [PATCH] Fix for crash when erasing center cross of compass arc Erasing part of (but not the entire) center cross of an arc drawn with the compass caused a crash. --- src/domain/UBGraphicsScene.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/domain/UBGraphicsScene.cpp b/src/domain/UBGraphicsScene.cpp index c64815f2..147e2d70 100644 --- a/src/domain/UBGraphicsScene.cpp +++ b/src/domain/UBGraphicsScene.cpp @@ -651,7 +651,9 @@ bool UBGraphicsScene::inputDeviceRelease() mAddedItems.remove(item); removeItem(item); UBCoreGraphicsScene::removeItemFromDeletion(item); - mArcPolygonItem->setStrokesGroup(pStrokes); + UBGraphicsPolygonItem* pi = qgraphicsitem_cast(item); + if (pi) + pi->setStrokesGroup(pStrokes); pStrokes->addToGroup(item); }