diff options
Diffstat (limited to 'src')
| -rw-r--r-- | src/common/app.c | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/src/common/app.c b/src/common/app.c index 9d52e4a..435d020 100644 --- a/src/common/app.c +++ b/src/common/app.c @@ -111,8 +111,13 @@ static void app_runner_surface_close(struct yasl_surface *s, void *ud) { struct app_surface *as = ud; struct app_runner *ar = as ? as->runner : NULL; - if (!ar || !ar->desc || !ar->desc->event) + if (!ar || !ar->desc) + return; + /* Without an event callback nothing could answer the request, so quit. */ + if (!ar->desc->event) { + ar->running = false; return; + } emit(ar, &(struct yasl_event){ .type = YASL_EVENT_WINDOW_CLOSE, |
