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>
bb10
Rolf Eike Beer 2020-05-20 09:11:39 +02:00
parent 97d22d7171
commit c4b172b7f0
1 changed files with 3 additions and 0 deletions

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;