Fix crash when cursor theme lookup failed
meta_cursor_reference_from_theme() may return %NULL on failure, in which case we currently crash when trying to release it.
This commit is contained in:
@@ -1376,7 +1376,8 @@ meta_screen_update_cursor (MetaScreen *screen)
|
||||
|
||||
cursor_ref = meta_cursor_reference_from_theme (cursor);
|
||||
meta_cursor_tracker_set_root_cursor (tracker, cursor_ref);
|
||||
meta_cursor_reference_unref (cursor_ref);
|
||||
if (cursor_ref)
|
||||
meta_cursor_reference_unref (cursor_ref);
|
||||
|
||||
/* Set a cursor for X11 applications that don't specify their own */
|
||||
xcursor = meta_display_create_x_cursor (display, cursor);
|
||||
|
Reference in New Issue
Block a user