diff --git a/src/widgets/graphicsview/qgraphicsitem.cpp b/src/widgets/graphicsview/qgraphicsitem.cpp index 87f5f17531..86fd3ce04a 100644 --- a/src/widgets/graphicsview/qgraphicsitem.cpp +++ b/src/widgets/graphicsview/qgraphicsitem.cpp @@ -2147,6 +2147,8 @@ bool QGraphicsItem::hasCursor() const */ void QGraphicsItem::unsetCursor() { + if (!d_ptr->hasCursor) + return; d_ptr->unsetExtra(QGraphicsItemPrivate::ExtraCursor); d_ptr->hasCursor = 0; if (d_ptr->scene) {