screen: Crash when we can't load a cursor

To make it easier for users to understand why their cursor disappeared.
This commit is contained in:
Jasper St. Pierre 2014-12-28 22:13:44 -08:00
parent cd4206764e
commit 5ad15bb5e5

View File

@ -1262,9 +1262,11 @@ meta_screen_update_cursor (MetaScreen *screen)
MetaCursorTracker *tracker = meta_cursor_tracker_get_for_screen (screen);
cursor_ref = meta_cursor_reference_from_theme (cursor);
if (cursor_ref == NULL)
g_fatal ("Could not find cursor. Perhaps set XCURSOR_PATH?");
meta_cursor_tracker_set_root_cursor (tracker, cursor_ref);
if (cursor_ref)
meta_cursor_reference_unref (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);