video: waylandmouse: handle mmap error properly

Signed-off-by: Ryo Munakata <ryomnktml@gmail.com>
main
Ryo Munakata 2014-09-09 17:26:16 +09:00
parent 5f39ea89c9
commit 7798b4d62a
1 changed files with 1 additions and 1 deletions

View File

@ -126,7 +126,7 @@ create_buffer_from_shm(Wayland_CursorData *d,
MAP_SHARED, MAP_SHARED,
shm_fd, shm_fd,
0); 0);
if (data == MAP_FAILED) { if (d->shm_data == MAP_FAILED) {
d->shm_data = NULL; d->shm_data = NULL;
fprintf (stderr, "mmap () failed\n"); fprintf (stderr, "mmap () failed\n");
close (shm_fd); close (shm_fd);