aboutsummaryrefslogtreecommitdiff
path: root/examples
diff options
context:
space:
mode:
authorIan Fan <ianfan0@gmail.com>2018-12-29 14:49:37 +0000
committeremersion <contact@emersion.fr>2018-12-30 16:36:20 +0100
commite2c216a4b84803668a10351dc1d5d9d922ae5539 (patch)
treefabf6bef1b1432f75ece5ec851248e1d4a70294f /examples
parent84c904752f10e24f052beaf12eb3cc529f1bb38d (diff)
examples/layer-shell.c: check popup exists before drawing
Diffstat (limited to 'examples')
-rw-r--r--examples/layer-shell.c4
1 files changed, 3 insertions, 1 deletions
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 = {