From 35da13082863216f3c6852e09ae4036fddd0a604 Mon Sep 17 00:00:00 2001 From: Philipp Wiesemann Date: Wed, 16 Mar 2016 22:09:39 +0100 Subject: [PATCH] Wayland: Fixed crash if memory mapping failed while creating a custom cursor. --- src/video/wayland/SDL_waylandmouse.c | 1 + 1 file changed, 1 insertion(+) diff --git a/src/video/wayland/SDL_waylandmouse.c b/src/video/wayland/SDL_waylandmouse.c index 740cbf8a7b20c..8a8332cc5488e 100644 --- a/src/video/wayland/SDL_waylandmouse.c +++ b/src/video/wayland/SDL_waylandmouse.c @@ -130,6 +130,7 @@ create_buffer_from_shm(Wayland_CursorData *d, d->shm_data = NULL; fprintf (stderr, "mmap () failed\n"); close (shm_fd); + return -1; } shm_pool = wl_shm_create_pool(data->shm, shm_fd, size);