mirror of
https://github.com/kovidgoyal/kitty.git
synced 2026-08-27 03:42:49 +00:00
Dont crash if Wayland returns a cursor image array with some null images
This commit is contained in:
parent
a785b77da9
commit
dc4762a69a
1 changed files with 2 additions and 0 deletions
2
glfw/wl_window.c
vendored
2
glfw/wl_window.c
vendored
|
|
@ -77,6 +77,8 @@ setCursorImage(_GLFWwindow* window)
|
|||
return;
|
||||
if (cursorWayland->currentImage >= cursorWayland->cursor->image_count) cursorWayland->currentImage = 0;
|
||||
image = cursorWayland->cursor->images[cursorWayland->currentImage];
|
||||
if (!image) image = cursorWayland->cursor->images[0];
|
||||
if (!image) return;
|
||||
buffer = wl_cursor_image_get_buffer(image);
|
||||
if (image->delay && window->cursor) {
|
||||
changeTimerInterval(&_glfw.wl.eventLoopData, _glfw.wl.cursorAnimationTimer, ms_to_monotonic_t(image->delay));
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue