video: waylandmouse: handle mmap error properly
Signed-off-by: Ryo Munakata <ryomnktml@gmail.com>
This commit is contained in:
parent
56f86cc81f
commit
18edcb1582
1 changed files with 1 additions and 1 deletions
|
@ -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);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue