diff options
| author | Tom Englund <tomenglund26@gmail.com> | 2025-09-25 15:30:04 +0200 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2025-09-25 15:30:04 +0200 |
| commit | 5212099b9f115932b84bcdb8c29b536f5ce385e4 (patch) | |
| tree | bbdfb0b56e5e573106a522aa15c47fc0ede05346 /src/layout/IHyprLayout.cpp | |
| parent | 8cce3b98cebd6910a9c94c11a6efb2293d2031bc (diff) | |
layout: avoid nullptr deref (#11831)
OPENINGON can be a nullptr and that makes FLOATEDINTOTILED to nullptr
deref and segfault.
Diffstat (limited to 'src/layout/IHyprLayout.cpp')
| -rw-r--r-- | src/layout/IHyprLayout.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/layout/IHyprLayout.cpp b/src/layout/IHyprLayout.cpp index 464825c4..e21cd886 100644 --- a/src/layout/IHyprLayout.cpp +++ b/src/layout/IHyprLayout.cpp @@ -206,7 +206,7 @@ bool IHyprLayout::onWindowCreatedAutoGroup(PHLWINDOW pWindow) { const PHLWINDOW OPENINGON = g_pCompositor->m_lastWindow.lock() && g_pCompositor->m_lastWindow->m_workspace == pWindow->m_workspace ? g_pCompositor->m_lastWindow.lock() : (pWindow->m_workspace ? pWindow->m_workspace->getFirstWindow() : nullptr); - const bool FLOATEDINTOTILED = pWindow->m_isFloating && !OPENINGON->m_isFloating; + const bool FLOATEDINTOTILED = pWindow->m_isFloating && OPENINGON && !OPENINGON->m_isFloating; const bool SWALLOWING = pWindow->m_swallowed || pWindow->m_groupSwallowed; if ((*PAUTOGROUP || SWALLOWING) // continue if auto_group is enabled or if dealing with window swallowing. |
