Fix segfault from dynamic_cast w/o check

This commit is contained in:
wandererfan
2019-04-05 10:04:17 -04:00
committed by WandererFan
parent ca24f0a821
commit 36ced68078

View File

@@ -234,6 +234,10 @@ void QGIPrimPath::mousePressEvent(QGraphicsSceneMouseEvent * event)
QGraphicsItem* qparent = parentItem();
if (qparent != nullptr) {
parent = dynamic_cast<QGIView *> (qparent);
parent->mousePressEvent(event);
if (parent != nullptr) {
parent->mousePressEvent(event);
} else {
Base::Console().Log("QGIPP::mousePressEvent - no QGIView parent\n");
}
}
}