mirror of
https://github.com/KDE/krfb
synced 2026-07-01 07:41:17 -07:00
Fixed crash calling PWFrameBuffer::cursorPosition()
Return default QPoint when `d->cursor` is not set. BUG: 472453
This commit is contained in:
@@ -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 {};
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user