From 87e4c9354e17037b7a3b7a21da10283c93d80f7d Mon Sep 17 00:00:00 2001 From: Rafal Mielniczuk Date: Tue, 8 May 2012 22:10:44 +0200 Subject: [PATCH] window: fix check of cursor image load result --- clients/window.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/clients/window.c b/clients/window.c index 12a98cb0..2c59b23d 100644 --- a/clients/window.c +++ b/clients/window.c @@ -676,7 +676,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; @@ -687,7 +687,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];