mirror of
https://github.com/cage-kiosk/cage.git
synced 2025-10-29 05:40:19 -04:00
Cage: check for sigchld_source being NULL before removing it
If something goes wrong during startup (i.e., the wlroots backend cannot be created), we jump to the end. This then unconditionally removes the sigchld_source, but that hasn't been set at this point yet.
This commit is contained in:
parent
e96fccfa54
commit
27391f174a
1 changed files with 3 additions and 1 deletions
4
cage.c
4
cage.c
|
|
@ -495,7 +495,9 @@ end:
|
|||
|
||||
wl_event_source_remove(sigint_source);
|
||||
wl_event_source_remove(sigterm_source);
|
||||
wl_event_source_remove(sigchld_source);
|
||||
if (sigchld_source) {
|
||||
wl_event_source_remove(sigchld_source);
|
||||
}
|
||||
seat_destroy(server.seat);
|
||||
/* This function is not null-safe, but we only ever get here
|
||||
with a proper wl_display. */
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue