fix null deref in sigchld() if Xwayland is disabled

This commit is contained in:
Dima Krasner 2022-12-03 12:06:29 +02:00 committed by Leonardo Hernández
parent 30c24a53ad
commit 16a49e9955
1 changed files with 1 additions and 1 deletions

2
dwl.c
View File

@ -2543,7 +2543,7 @@ sigchld(int unused)
* XWayland process
*/
while (!waitid(P_ALL, 0, &in, WEXITED|WNOHANG|WNOWAIT) && in.si_pid
&& in.si_pid != xwayland->server->pid)
&& (!xwayland || in.si_pid != xwayland->server->pid))
waitpid(in.si_pid, NULL, 0);
}