mirror of
https://gitlab.freedesktop.org/wayland/wayland.git
synced 2025-10-31 22:25:25 -04:00
wayland-shm: Check visual for being NULL
This commit is contained in:
parent
eff7fc0d99
commit
b06e891e4c
1 changed files with 1 additions and 1 deletions
|
|
@ -119,7 +119,7 @@ shm_create_buffer(struct wl_client *client, struct wl_shm *shm,
|
|||
struct wl_shm_buffer *buffer;
|
||||
void *data;
|
||||
|
||||
if (visual->object.interface != &wl_visual_interface) {
|
||||
if (!visual || visual->object.interface != &wl_visual_interface) {
|
||||
wl_client_post_error(client, &shm->object,
|
||||
WL_SHM_ERROR_INVALID_VISUAL,
|
||||
"invalid visual");
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue