From 22da9d4d777a1684364390c801d09736a26d5eaa Mon Sep 17 00:00:00 2001 From: "Ryan C. Gordon" Date: Thu, 28 May 2020 14:47:55 -0400 Subject: [PATCH] wayland: assert that mmap() didn't return NULL. In practice, it never _would_, but in theory it _might_, so this assertion tells the static analyzer not to worry about it. --- src/video/wayland/SDL_waylandmouse.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/video/wayland/SDL_waylandmouse.c b/src/video/wayland/SDL_waylandmouse.c index c540921f07ded..77c0c5451d04c 100644 --- a/src/video/wayland/SDL_waylandmouse.c +++ b/src/video/wayland/SDL_waylandmouse.c @@ -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,