window: fix check of cursor image load result
authorRafal Mielniczuk <rafal.mielniczuk2@gmail.com>
Tue, 8 May 2012 20:10:44 +0000 (22:10 +0200)
committerKristian Høgsberg <krh@bitplanet.net>
Tue, 8 May 2012 20:22:31 +0000 (16:22 -0400)
clients/window.c

index 12a98cb..2c59b23 100644 (file)
@@ -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];