xwm: Fail safely if cursor is not found
It will use the stock 'x' cursor instead when the system cursors are not
provided.
Signed-off-by: Tiago Vignatti <tiago.vignatti@intel.com>
diff --git a/src/xwayland/window-manager.c b/src/xwayland/window-manager.c
index 6d4ce1b..57b4e3c 100644
--- a/src/xwayland/window-manager.c
+++ b/src/xwayland/window-manager.c
@@ -206,6 +206,9 @@
size = 32;
images = XcursorLibraryLoadImages (file, NULL, size);
+ if (!images)
+ return -1;
+
cursor = xcb_cursor_images_load_cursor (wm, images);
XcursorImagesDestroy (images);