From 16a49e99557563252b9f91db767b431e2238f587 Mon Sep 17 00:00:00 2001 From: Dima Krasner Date: Sat, 3 Dec 2022 12:06:29 +0200 Subject: [PATCH] fix null deref in sigchld() if Xwayland is disabled --- dwl.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/dwl.c b/dwl.c index cea34cc..3891cb7 100644 --- a/dwl.c +++ b/dwl.c @@ -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); }