summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBenjamin Franzke <benjaminfranzke@googlemail.com>2011-05-31 11:18:06 +0200
committerBenjamin Franzke <benjaminfranzke@googlemail.com>2011-05-31 11:18:06 +0200
commitb06e891e4ca47278f2712dfba804fc169db39f9a (patch)
tree7b889b52c5cff753824088400d6d75bf6a09ddbf
parenteff7fc0d99be2e51eaa351785030c8d374ac71de (diff)
wayland-shm: Check visual for being NULL
-rw-r--r--wayland/wayland-shm.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/wayland/wayland-shm.c b/wayland/wayland-shm.c
index 8a15f4c..cdd7874 100644
--- a/wayland/wayland-shm.c
+++ b/wayland/wayland-shm.c
@@ -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");