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>
This commit is contained in:
Rolf Eike Beer 2020-05-20 09:11:39 +02:00 committed by Qt Cherry-pick Bot
parent 47fed5b007
commit 22b82fbb96

View File

@ -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;