diff options
author | Andy Nichols <andy.nichols@digia.com> | 2013-01-28 15:47:20 +0100 |
---|---|---|
committer | Andy Nichols <andy.nichols@digia.com> | 2013-01-29 10:46:33 +0100 |
commit | 9a2677874c5431996184bc8263a14966650481c2 (patch) | |
tree | c7bd6cc1c69de3cf4c41174c9c069cb087128067 /src | |
parent | a6d969abf59ff3a9634910f9b9b7cb588eeea7c6 (diff) |
Fix crash when unsetting cursor
cursor pointer is null when we unset, so we must check for this.
Change-Id: Ib0b0dae8e98d7f3b3f7e2a1d2037d3d4981027f4
Reviewed-by: Giulio Camuffo <giuliocamuffo@gmail.com>
Reviewed-by: Jørgen Lind <jorgen.lind@gmail.com>
Diffstat (limited to 'src')
-rw-r--r-- | src/plugins/platforms/wayland/qwaylandcursor.cpp | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/plugins/platforms/wayland/qwaylandcursor.cpp b/src/plugins/platforms/wayland/qwaylandcursor.cpp index 99ac0fd4f..916751fa0 100644 --- a/src/plugins/platforms/wayland/qwaylandcursor.cpp +++ b/src/plugins/platforms/wayland/qwaylandcursor.cpp @@ -183,7 +183,8 @@ void QWaylandCursor::changeCursor(QCursor *cursor, QWindow *window) Q_UNUSED(window) int pointer = 0; - switch (cursor->shape()) { + const Qt::CursorShape newShape = cursor ? cursor->shape() : Qt::ArrowCursor; + switch (newShape) { case Qt::UpArrowCursor: case Qt::CrossCursor: case Qt::WaitCursor: |