summaryrefslogtreecommitdiffstats
path: root/src/gui
diff options
context:
space:
mode:
authorJoni Poikelin <joni.poikelin@digia.com>2014-12-22 10:00:54 +0200
committerShawn Rutledge <shawn.rutledge@digia.com>2014-12-23 10:11:23 +0100
commit0920e00932b2686b59247633ea01669fcc398f9c (patch)
treed0f71171ca053b98f0723442aec78bcce2faee6b /src/gui
parent033318f7a747ee2630542bed37df7e3fc10a0fb1 (diff)
Check screen before changing cursor
Task-number: QTBUG-43508 Change-Id: I6b525cab2a3958f4e3528ed8102d07984f152e60 Reviewed-by: Shawn Rutledge <shawn.rutledge@digia.com>
Diffstat (limited to 'src/gui')
-rw-r--r--src/gui/kernel/qwindow.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/gui/kernel/qwindow.cpp b/src/gui/kernel/qwindow.cpp
index c5d88b198b..a4b5376b6f 100644
--- a/src/gui/kernel/qwindow.cpp
+++ b/src/gui/kernel/qwindow.cpp
@@ -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);