summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorRolf Eike Beer <eb@emlix.com>2020-05-20 09:11:39 +0200
committerRolf Eike Beer <eb@emlix.com>2020-05-25 10:29:37 +0200
commitc4b172b7f0158fccf6d0ac1a72081d0749410b1b (patch)
treeee0b805cd961ec25a55b725f14e8f3762a1f4c3c /src
parent97d22d71719099cb64a497e2c9d7f0341e2c2923 (diff)
QVncScreen: fix crash on disconnect client did not request cursor
Change-Id: I758c79d87bd239b6fde9bae4e97c5b31450fa813 Pick-to: 5.15 5.12 Reviewed-by: Laszlo Agocs <laszlo.agocs@qt.io>
Diffstat (limited to 'src')
-rw-r--r--src/plugins/platforms/vnc/qvncscreen.cpp3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/plugins/platforms/vnc/qvncscreen.cpp b/src/plugins/platforms/vnc/qvncscreen.cpp
index 5dc3919ff5..4c55e0fd01 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;