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.
This commit is contained in:
Hiroki Tagato 2025-11-14 07:06:34 +09:00 committed by GitHub
parent 55a93b8a52
commit 43527d3634
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
3 changed files with 6 additions and 0 deletions

View file

@ -3029,6 +3029,8 @@ void CCompositor::arrangeMonitors() {
#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
}