From 7798b4d62a43318a52e520ccf8d81e1b564c1cb0 Mon Sep 17 00:00:00 2001 From: Ryo Munakata Date: Tue, 9 Sep 2014 17:26:16 +0900 Subject: [PATCH] video: waylandmouse: handle mmap error properly Signed-off-by: Ryo Munakata --- src/video/wayland/SDL_waylandmouse.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/video/wayland/SDL_waylandmouse.c b/src/video/wayland/SDL_waylandmouse.c index 8abf22752..338f42f87 100644 --- a/src/video/wayland/SDL_waylandmouse.c +++ b/src/video/wayland/SDL_waylandmouse.c @@ -126,7 +126,7 @@ create_buffer_from_shm(Wayland_CursorData *d, MAP_SHARED, shm_fd, 0); - if (data == MAP_FAILED) { + if (d->shm_data == MAP_FAILED) { d->shm_data = NULL; fprintf (stderr, "mmap () failed\n"); close (shm_fd);