From ac78bb1017f0b8079a04c8b2c278d8e18afd11c4 Mon Sep 17 00:00:00 2001 From: Tiago Vignatti Date: Fri, 28 Sep 2012 16:29:46 +0300 Subject: [PATCH] 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 --- src/xwayland/window-manager.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/xwayland/window-manager.c b/src/xwayland/window-manager.c index 6d4ce1bb..57b4e3c3 100644 --- a/src/xwayland/window-manager.c +++ b/src/xwayland/window-manager.c @@ -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);