diff options
author | Rolf Eike Beer <eb@emlix.com> | 2020-05-20 09:11:39 +0200 |
---|---|---|
committer | Qt Cherry-pick Bot <cherrypick_bot@qt-project.org> | 2020-06-04 06:50:20 +0000 |
commit | 22b82fbb9659b3f81dea47a23f1bacbae9c2a4e5 (patch) | |
tree | c4e2a80c9a8cbbe6d3c5e38227ba6d03179d856b | |
parent | 47fed5b00732902d57063902c98d0a601d9ff239 (diff) |
QVncScreen: fix crash on disconnect client did not request cursor
Change-Id: I758c79d87bd239b6fde9bae4e97c5b31450fa813
Reviewed-by: Laszlo Agocs <laszlo.agocs@qt.io>
(cherry picked from commit c4b172b7f0158fccf6d0ac1a72081d0749410b1b)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
-rw-r--r-- | src/plugins/platforms/vnc/qvncscreen.cpp | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/src/plugins/platforms/vnc/qvncscreen.cpp b/src/plugins/platforms/vnc/qvncscreen.cpp index 67d33de2f0..7f418c4e37 100644 --- a/src/plugins/platforms/vnc/qvncscreen.cpp +++ b/src/plugins/platforms/vnc/qvncscreen.cpp @@ -139,6 +139,9 @@ void QVncScreen::enableClientCursor(QVncClient *client) void QVncScreen::disableClientCursor(QVncClient *client) { #if QT_CONFIG(cursor) + if (!clientCursor) + return; + uint clientCount = clientCursor->removeClient(client); if (clientCount == 0) { delete clientCursor; |