From 1febe0108461a067bc4839ad74c8415644e785b6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Kristian=20H=C3=B8gsberg?= Date: Tue, 10 Feb 2009 18:30:14 -0500 Subject: [PATCH] Don't crash when there's no primary surface. --- wayland-system-compositor.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/wayland-system-compositor.c b/wayland-system-compositor.c index a0ab5f98..384b86da 100644 --- a/wayland-system-compositor.c +++ b/wayland-system-compositor.c @@ -1014,7 +1014,7 @@ notify_key(struct wlsc_input_device *device, case KEY_LEFTMETA | META_DOWN: case KEY_RIGHTMETA | META_DOWN: ec->meta_state = state ? META_DOWN : 0; - if (state == 0) { + if (state == 0 && ec->primary != NULL) { ec->primary->target.z = 0; wl_list_remove(&ec->primary->animate.link); wl_list_insert(&ec->animate_list,