浏览代码

Wayland: Fixed crash if memory mapping failed while creating a custom cursor.

Philipp Wiesemann 9 年之前
父节点
当前提交
35da130828
共有 1 个文件被更改,包括 1 次插入0 次删除
  1. 1 0
      src/video/wayland/SDL_waylandmouse.c

+ 1 - 0
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);