Don't crash if qApp->overrideCursor() is 0
Change-Id: I9e61be7ed537a988ce8ccca20f672f5c66275452 Reviewed-on: http://codereview.qt-project.org/5561 Reviewed-by: Qt Sanity Bot <qt_sanity_bot@ovi.com> Reviewed-by: Samuel Rødal <samuel.rodal@nokia.com>
This commit is contained in:
parent
009480275e
commit
926d6189bf
@ -365,10 +365,9 @@ void QDragManager::updateCursor()
|
||||
cursorShape = Qt::DragMoveCursor;
|
||||
}
|
||||
}
|
||||
if (cursorShape != qApp->overrideCursor()->shape()) {
|
||||
qDebug() << "setting cursor shape to" << cursorShape;
|
||||
QCursor *cursor = qApp->overrideCursor();
|
||||
if (cursor && cursorShape != cursor->shape())
|
||||
qApp->changeOverrideCursor(QCursor(cursorShape));
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user