Skip to content

Commit

Permalink
wayland: assert that mmap() didn't return NULL.
Browse files Browse the repository at this point in the history
In practice, it never _would_, but in theory it _might_, so this assertion
tells the static analyzer not to worry about it.
  • Loading branch information
icculus committed May 28, 2020
1 parent 1a1f170 commit 22da9d4
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/video/wayland/SDL_waylandmouse.c
Expand Up @@ -125,6 +125,8 @@ create_buffer_from_shm(Wayland_CursorData *d,
return SDL_SetError("mmap() failed.");
}

SDL_assert(d->shm_data != NULL);

shm_pool = wl_shm_create_pool(data->shm, shm_fd, size);
d->buffer = wl_shm_pool_create_buffer(shm_pool,
0,
Expand Down

0 comments on commit 22da9d4

Please sign in to comment.