mirror of
https://gitlab.gnome.org/GNOME/gtk.git
synced 2024-11-10 02:40:11 +00:00
wayland: avoid returning NULL when getting a cursor
https://bugzilla.gnome.org/show_bug.cgi?id=693257
This commit is contained in:
parent
4f6d535626
commit
6657479c72
@ -298,8 +298,14 @@ _gdk_wayland_display_get_cursor_for_name (GdkDisplay *display,
|
|||||||
if (!cursor)
|
if (!cursor)
|
||||||
{
|
{
|
||||||
g_warning (G_STRLOC ": Unable to load %s from the cursor theme", name);
|
g_warning (G_STRLOC ": Unable to load %s from the cursor theme", name);
|
||||||
g_object_unref (private);
|
|
||||||
return NULL;
|
/* return the left_ptr cursor as a fallback */
|
||||||
|
cursor = wl_cursor_theme_get_cursor (wayland_display->cursor_theme,
|
||||||
|
"left_ptr");
|
||||||
|
|
||||||
|
/* if the fallback failed to load, return a blank pointer */
|
||||||
|
if (!cursor)
|
||||||
|
return GDK_CURSOR (private);
|
||||||
}
|
}
|
||||||
|
|
||||||
/* TODO: Do something clever so we can do animated cursors - move the
|
/* TODO: Do something clever so we can do animated cursors - move the
|
||||||
|
Loading…
Reference in New Issue
Block a user