Skip to content

Commit

Permalink
wayland: fix possible out-of-range crash in setCursor
Browse files Browse the repository at this point in the history
  • Loading branch information
vaxerski committed Aug 26, 2024
1 parent ddf6987 commit 3989aa9
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/backend/Wayland.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -655,7 +655,8 @@ bool Aquamarine::CWaylandOutput::setCursor(Hyprutils::Memory::CSharedPointer<IBu
if (!buffer) {
cursorState.cursorBuffer.reset();
cursorState.cursorWlBuffer.reset();
backend->pointers.at(0)->pointer->sendSetCursor(cursorState.serial, nullptr, cursorState.hotspot.x, cursorState.hotspot.y);
if (!backend->pointers.empty())
backend->pointers.at(0)->pointer->sendSetCursor(cursorState.serial, nullptr, cursorState.hotspot.x, cursorState.hotspot.y);
return true;
}

Expand Down

0 comments on commit 3989aa9

Please sign in to comment.