From 089aa313b40b495e9d9a9d209fe3851d43807f6e Mon Sep 17 00:00:00 2001 From: Benjamin Franzke Date: Tue, 31 May 2011 14:20:59 +0200 Subject: wayland-drm: Check visual for being NULL --- src/egl/wayland/wayland-drm/wayland-drm.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/egl') diff --git a/src/egl/wayland/wayland-drm/wayland-drm.c b/src/egl/wayland/wayland-drm/wayland-drm.c index d68f9c7bac3..6cc442b9d53 100644 --- a/src/egl/wayland/wayland-drm/wayland-drm.c +++ b/src/egl/wayland/wayland-drm/wayland-drm.c @@ -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"); -- cgit v1.2.3