xwm: Fail safely if cursor is not found
authorTiago Vignatti <tiago.vignatti@intel.com>
Fri, 28 Sep 2012 13:29:46 +0000 (16:29 +0300)
committerKristian Høgsberg <krh@bitplanet.net>
Mon, 29 Oct 2012 17:44:33 +0000 (13:44 -0400)
It will use the stock 'x' cursor instead when the system cursors are not
provided.

Signed-off-by: Tiago Vignatti <tiago.vignatti@intel.com>
src/xwayland/window-manager.c

index 6d4ce1b..57b4e3c 100644 (file)
@@ -206,6 +206,9 @@ xcb_cursor_library_load_cursor(struct weston_wm *wm, const char *file)
                size = 32;
 
        images = XcursorLibraryLoadImages (file, NULL, size);
+       if (!images)
+               return -1;
+
        cursor = xcb_cursor_images_load_cursor (wm, images);
        XcursorImagesDestroy (images);