[PATCH] window: fix check of cursor image load result

Rafal Mielniczuk rafal.mielniczuk2 at gmail.com
Tue May 8 13:10:44 PDT 2012


---
 clients/window.c |    4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/clients/window.c b/clients/window.c
index b47e969..695fc89 100644
--- a/clients/window.c
+++ b/clients/window.c
@@ -665,7 +665,7 @@ create_cursors(struct display *display)
 
 	for (i = 0; i < count; i++) {
 		images[i] = XcursorLibraryLoadImages(cursors[i], NULL, 32);
-		if (!images) {
+		if (!images[i]) {
 			fprintf(stderr, "Error loading cursor: %s\n",
 				cursors[i]);
 			continue;
@@ -676,7 +676,7 @@ create_cursors(struct display *display)
 	display->cursor_shm_pool = shm_pool_create(display, pool_size);
 
 	for (i = 0; i < count; i++) {
-		if (!images)
+		if (!images[i])
 			continue;
 
 		cursor = &display->cursors[i];
-- 
1.7.10.1



More information about the wayland-devel mailing list