forked from AuroraMiddleware/gtk
x11: Only update cursors if we have any
We were accessing an on-demand created hash table without checking if it had been created first. Fixes: https://gitlab.gnome.org/GNOME/gtk/issues/2308
This commit is contained in:
parent
6ddc214e68
commit
bf2c29a36a
@ -305,6 +305,9 @@ gdk_x11_display_set_cursor_theme (GdkDisplay *display,
|
||||
if (size > 0)
|
||||
XcursorSetDefaultSize (xdisplay, size);
|
||||
|
||||
if (GDK_X11_DISPLAY (display)->cursors == NULL)
|
||||
return;
|
||||
|
||||
g_hash_table_iter_init (&iter, GDK_X11_DISPLAY (display)->cursors);
|
||||
while (g_hash_table_iter_next (&iter, &cursor, &xcursor))
|
||||
{
|
||||
|
Loading…
Reference in New Issue
Block a user