Check screen before changing cursor
Task-number: QTBUG-43508 Change-Id: I6b525cab2a3958f4e3528ed8102d07984f152e60 Reviewed-by: Shawn Rutledge <shawn.rutledge@digia.com>bb10
parent
033318f7a7
commit
0920e00932
|
|
@ -2393,7 +2393,8 @@ void QWindowPrivate::setCursor(const QCursor *newCursor)
|
|||
hasCursor = false;
|
||||
}
|
||||
// Only attempt to set cursor and emit signal if there is an actual platform cursor
|
||||
if (q->screen()->handle()->cursor()) {
|
||||
QScreen* screen = q->screen();
|
||||
if (screen && screen->handle()->cursor()) {
|
||||
applyCursor();
|
||||
QEvent event(QEvent::CursorChange);
|
||||
QGuiApplication::sendEvent(q, &event);
|
||||
|
|
|
|||
Loading…
Reference in New Issue