mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-01-06 21:50:11 +01:00
wayland-drm: Check visual for being NULL
This commit is contained in:
parent
fc5aec9342
commit
089aa313b4
1 changed files with 1 additions and 1 deletions
|
|
@ -100,7 +100,7 @@ drm_create_buffer(struct wl_client *client, struct wl_drm *drm,
|
|||
buffer->buffer.height = height;
|
||||
buffer->buffer.visual = visual;
|
||||
|
||||
if (visual->object.interface != &wl_visual_interface) {
|
||||
if (!visual || visual->object.interface != &wl_visual_interface) {
|
||||
wl_client_post_error(client, &drm->object,
|
||||
WL_DRM_ERROR_INVALID_VISUAL,
|
||||
"invalid visual");
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue