summaryrefslogtreecommitdiffstats
path: root/src/egl/wayland/wayland-drm
diff options
context:
space:
mode:
authorBenjamin Franzke <benjaminfranzke@googlemail.com>2011-05-31 14:20:59 +0200
committerKristian Høgsberg <krh@bitplanet.net>2011-05-31 15:13:37 -0400
commit089aa313b40b495e9d9a9d209fe3851d43807f6e (patch)
tree2b99346a603f78b7f9b4f6e352b865bef8f3b677 /src/egl/wayland/wayland-drm
parentfc5aec934237389946a5afd42414a57c4568c5cd (diff)
downloadexternal_mesa3d-089aa313b40b495e9d9a9d209fe3851d43807f6e.zip
external_mesa3d-089aa313b40b495e9d9a9d209fe3851d43807f6e.tar.gz
external_mesa3d-089aa313b40b495e9d9a9d209fe3851d43807f6e.tar.bz2
wayland-drm: Check visual for being NULL
Diffstat (limited to 'src/egl/wayland/wayland-drm')
-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 d68f9c7..6cc442b 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");