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

2
dwl.c
View File

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