summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDima Krasner <dima@dimakrasner.com>2022-12-03 12:06:29 +0200
committerLeonardo Hernández <leohdz172@protonmail.com>2022-12-03 13:30:30 -0600
commit16a49e99557563252b9f91db767b431e2238f587 (patch)
tree89233560f6c8828d025d77ff5b8df273b39736d8
parent30c24a53ad2aaa842bc3b028ba0b98e3362dad7c (diff)
fix null deref in sigchld() if Xwayland is disabled
-rw-r--r--dwl.c2
1 files changed, 1 insertions, 1 deletions
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);
}