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 <daniels@collabora.com>
This commit is contained in:
Daniel Stone 2023-05-01 15:37:21 +01:00
parent c2cd15ed11
commit a72d0c1bb0

View File

@ -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)