mirror of
https://github.com/brl/mutter.git
synced 2024-12-24 12:02:04 +00:00
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:
parent
b773898a60
commit
d9a2443e53
@ -1709,7 +1709,8 @@ meta_display_set_grab_op_cursor (MetaDisplay *display,
|
||||
|
||||
cursor_ref = meta_cursor_reference_from_theme (cursor);
|
||||
meta_cursor_tracker_set_grab_cursor (tracker, cursor_ref);
|
||||
meta_cursor_reference_unref (cursor_ref);
|
||||
if (cursor_ref)
|
||||
meta_cursor_reference_unref (cursor_ref);
|
||||
|
||||
if (meta_backend_grab_device (backend, META_VIRTUAL_CORE_POINTER_ID, timestamp))
|
||||
display->grab_have_pointer = TRUE;
|
||||
|
@ -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);
|
||||
|
Loading…
Reference in New Issue
Block a user