From e2c216a4b84803668a10351dc1d5d9d922ae5539 Mon Sep 17 00:00:00 2001 From: Ian Fan Date: Sat, 29 Dec 2018 14:49:37 +0000 Subject: [PATCH] examples/layer-shell.c: check popup exists before drawing --- examples/layer-shell.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/examples/layer-shell.c b/examples/layer-shell.c index 114b98f6..77b2f6c3 100644 --- a/examples/layer-shell.c +++ b/examples/layer-shell.c @@ -87,7 +87,9 @@ static void popup_surface_frame_callback( void *data, struct wl_callback *cb, uint32_t time) { wl_callback_destroy(cb); popup_frame_callback = NULL; - draw_popup(); + if (popup) { + draw_popup(); + } } static struct wl_callback_listener popup_frame_listener = {