From a72d0c1bb0741b1aeee5b67ec147705cf88b4dec Mon Sep 17 00:00:00 2001 From: Daniel Stone Date: Mon, 1 May 2023 15:37:21 +0100 Subject: [PATCH] frontend: Allow NULL wet_process cleanup handler Don't call cleanup if we haven't been given anything to call. Signed-off-by: Daniel Stone --- compositor/main.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/compositor/main.c b/compositor/main.c index c3d72cf0..e4221ba1 100644 --- a/compositor/main.c +++ b/compositor/main.c @@ -362,7 +362,8 @@ sigchld_handler(int signal_number, void *data) wl_list_remove(&p->link); wl_list_init(&p->link); free(p->path); - p->cleanup(p, status, p->cleanup_data); + if (p->cleanup) + p->cleanup(p, status, p->cleanup_data); } if (pid < 0 && errno != ECHILD)