fix null deref in sigchld() if Xwayland is disabled

This commit is contained in:
Dima Krasner 2022-12-03 12:06:29 +02:00
parent 9c155eefdc
commit ee8b613c9a

2
dwl.c
View File

@ -2564,7 +2564,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);
}