[mutter] screen: Crash when we can't load a cursor
- From: Jasper St. Pierre <jstpierre src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [mutter] screen: Crash when we can't load a cursor
- Date: Mon, 29 Dec 2014 06:38:08 +0000 (UTC)
commit 5ad15bb5e5ff1905167a7ea133c26399e060114b
Author: Jasper St. Pierre <jstpierre mecheye net>
Date: Sun Dec 28 22:13:44 2014 -0800
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 files changed, 4 insertions(+), 2 deletions(-)
---
diff --git a/src/core/screen.c b/src/core/screen.c
index 13e8c7f..6121724 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);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]