[PATCH weston 4/8] window: warn on cursor load failure

Pekka Paalanen ppaalanen at gmail.com
Tue Jul 31 03:21:09 PDT 2012


---
 clients/window.c |    6 +++++-
 1 files changed, 5 insertions(+), 1 deletions(-)

diff --git a/clients/window.c b/clients/window.c
index a2f339f..71fd6cc 100644
--- a/clients/window.c
+++ b/clients/window.c
@@ -652,10 +652,14 @@ create_cursors(struct display *display)
 	display->cursors =
 		malloc(ARRAY_LENGTH(cursors) * sizeof display->cursors[0]);
 
-	for (i = 0; i < ARRAY_LENGTH(cursors); i++)
+	for (i = 0; i < ARRAY_LENGTH(cursors); i++) {
 		display->cursors[i] =
 			wl_cursor_theme_get_cursor(display->cursor_theme,
 						   cursors[i]);
+		if (!display->cursors[i])
+			fprintf(stderr, "could not load cursor '%s'\n",
+				cursors[i]);
+	}
 }
 
 static void
-- 
1.7.8.6



More information about the wayland-devel mailing list