wayland: fix possible out-of-range crash in setCursor

This commit is contained in:
Vaxry 2024-08-26 10:30:29 +02:00
parent ddf6987b53
commit 3989aa9b2f

View file

@ -655,6 +655,7 @@ bool Aquamarine::CWaylandOutput::setCursor(Hyprutils::Memory::CSharedPointer<IBu
if (!buffer) {
cursorState.cursorBuffer.reset();
cursorState.cursorWlBuffer.reset();
if (!backend->pointers.empty())
backend->pointers.at(0)->pointer->sendSetCursor(cursorState.serial, nullptr, cursorState.hotspot.x, cursorState.hotspot.y);
return true;
}