From 5ad15bb5e5ff1905167a7ea133c26399e060114b Mon Sep 17 00:00:00 2001 From: "Jasper St. Pierre" Date: Sun, 28 Dec 2014 22:13:44 -0800 Subject: [PATCH] screen: Crash when we can't load a cursor To make it easier for users to understand why their cursor disappeared. --- src/core/screen.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/core/screen.c b/src/core/screen.c index 13e8c7f3a..61217249d 100644 --- a/src/core/screen.c +++ b/src/core/screen.c @@ -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);