wayland: Be more careful when loading cursors
Make sure we don't access the cursor_images array out of bounds. Related: #6234
This commit is contained in:
parent
7e1e11e280
commit
2b5a6963e4
@ -220,7 +220,7 @@ _gdk_wayland_cursor_get_buffer (GdkCursor *cursor,
|
||||
{
|
||||
GdkWaylandCursor *wayland_cursor = GDK_WAYLAND_CURSOR (cursor);
|
||||
|
||||
if (wayland_cursor->wl_cursor)
|
||||
if (wayland_cursor->wl_cursor && wayland_cursor->wl_cursor->image_count > 0)
|
||||
{
|
||||
struct wl_cursor_image *image;
|
||||
int cursor_scale;
|
||||
|
Loading…
Reference in New Issue
Block a user