video: waylandmouse: handle mmap error properly
Signed-off-by: Ryo Munakata <ryomnktml@gmail.com>main
parent
5f39ea89c9
commit
7798b4d62a
|
@ -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);
|
||||||
|
|
Loading…
Reference in New Issue