summaryrefslogtreecommitdiff
path: root/src/layout/DwindleLayout.cpp
diff options
context:
space:
mode:
authorHiroki Tagato <tagattie@gmail.com>2025-11-14 07:06:34 +0900
committerGitHub <noreply@github.com>2025-11-13 22:06:34 +0000
commit43527d363472b52f17dd9f9f4f87ec25cbf8a399 (patch)
treefd3f1c12b4e31e00deff6fc3d77b025803c8fe9e /src/layout/DwindleLayout.cpp
parent55a93b8a52ad3bd2c0a7468e8f79f5667eea0702 (diff)
internal: fix crash at startup on FreeBSD (#12298)
Hyprland at the latest commit crashes at starting up on FreeBSD with SIGSEGV. Checking the validity of g_pXWayland->m_wm before calling updateWorkArea() appears to fix the issue.
Diffstat (limited to 'src/layout/DwindleLayout.cpp')
-rw-r--r--src/layout/DwindleLayout.cpp2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/layout/DwindleLayout.cpp b/src/layout/DwindleLayout.cpp
index e46a0963..6df54445 100644
--- a/src/layout/DwindleLayout.cpp
+++ b/src/layout/DwindleLayout.cpp
@@ -601,6 +601,8 @@ void CHyprDwindleLayout::recalculateMonitor(const MONITORID& monid) {
#ifndef NO_XWAYLAND
CBox box = g_pCompositor->calculateX11WorkArea();
+ if (!g_pXWayland || !g_pXWayland->m_wm)
+ return;
g_pXWayland->m_wm->updateWorkArea(box.x, box.y, box.w, box.h);
#endif
}