1
0
mirror of https://invent.kde.org/network/krfb synced 2024-07-03 00:18:36 +00:00

Fixed crash calling PWFrameBuffer::cursorPosition()

Return default QPoint when `d->cursor` is not set.

BUG: 472453
This commit is contained in:
Yaroslav Sidlovsky 2024-04-22 16:55:47 +03:00 committed by Alexey Minnekhanov
parent 9422d0ccf1
commit d2f4b34fcb

View File

@ -501,5 +501,10 @@ bool PWFrameBuffer::isValid() const
QPoint PWFrameBuffer::cursorPosition()
{
return d->cursor->position;
const auto cursor = d->cursor;
if (cursor) {
return cursor->position;
} else {
return {};
}
}