summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBenjamin Franzke <benjaminfranzke@googlemail.com>2011-05-31 14:20:59 +0200
committerBenjamin Franzke <benjaminfranzke@googlemail.com>2011-05-31 14:20:59 +0200
commitbf85e1d765a34d8ff277bc7dc18cb6349f861aa4 (patch)
tree17a698f15bc90f1d8aac90aef134bfc301eedb6b
parentbd9070c92cc92b03dc14bbabbc67044cfaec1a2a (diff)
wayland-drm: Check visual for being NULLfixes
-rw-r--r--src/egl/wayland/wayland-drm/wayland-drm.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/egl/wayland/wayland-drm/wayland-drm.c b/src/egl/wayland/wayland-drm/wayland-drm.c
index d68f9c7bac..6cc442b9d5 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");