projects
/
gtk4.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
6ddc214
)
x11: Only update cursors if we have any
author
Matthias Clasen
<mclasen@redhat.com>
Fri, 13 Dec 2019 19:46:00 +0000
(14:46 -0500)
committer
Matthias Clasen
<mclasen@redhat.com>
Fri, 13 Dec 2019 19:46:00 +0000
(14:46 -0500)
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
gdk/x11/gdkcursor-x11.c
patch
|
blob
|
history
diff --git
a/gdk/x11/gdkcursor-x11.c
b/gdk/x11/gdkcursor-x11.c
index e0de28ed903016828166530c28c60c48da2fb210..6f2682dc40cfec36f2e6a4ca53b12a9924199896 100644
(file)
--- a/
gdk/x11/gdkcursor-x11.c
+++ b/
gdk/x11/gdkcursor-x11.c
@@
-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))
{