mirror of
https://invent.kde.org/network/krfb
synced 2024-06-29 06:24:57 +00:00
Fixed crash calling PWFrameBuffer::cursorPosition()
Return default QPoint when `d->cursor` is not set. BUG: 472453
This commit is contained in:
parent
1894fce111
commit
6e7a5ba569
|
@ -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 {};
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue
Block a user