video: waylandmouse: handle mmap error properly
authorRyo Munakata <ryomnktml@gmail.com>
Tue, 09 Sep 2014 17:26:16 +0900
changeset 913664fcdfcd5bca
parent 9135 6cd8e6b54f4d
child 9137 b0b056a7b932
video: waylandmouse: handle mmap error properly

Signed-off-by: Ryo Munakata <ryomnktml@gmail.com>
src/video/wayland/SDL_waylandmouse.c
     1.1 --- a/src/video/wayland/SDL_waylandmouse.c	Sat Sep 13 02:15:18 2014 -0700
     1.2 +++ b/src/video/wayland/SDL_waylandmouse.c	Tue Sep 09 17:26:16 2014 +0900
     1.3 @@ -126,7 +126,7 @@
     1.4                         MAP_SHARED,
     1.5                         shm_fd,
     1.6                         0);
     1.7 -    if (data == MAP_FAILED) {
     1.8 +    if (d->shm_data == MAP_FAILED) {
     1.9          d->shm_data = NULL;
    1.10          fprintf (stderr, "mmap () failed\n");
    1.11          close (shm_fd);