diff options
| author | nyx <nnyyxxxx@protonmail.com> | 2025-04-08 13:43:15 -0400 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2025-04-08 19:43:15 +0200 |
| commit | ea852965ffd4bf2bd2a74c0e821ba6190021eb31 (patch) | |
| tree | ed7b37128e1f9f646cf8f3aee53ba97ad0cd1043 /src/managers/XWaylandManager.cpp | |
| parent | 260d8e1f71b1dc6f3f354747debdc87d96b9e99f (diff) | |
xdg-shell: fix some null refs (#9992)
Diffstat (limited to 'src/managers/XWaylandManager.cpp')
| -rw-r--r-- | src/managers/XWaylandManager.cpp | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/src/managers/XWaylandManager.cpp b/src/managers/XWaylandManager.cpp index 63b14962..9d2fda1d 100644 --- a/src/managers/XWaylandManager.cpp +++ b/src/managers/XWaylandManager.cpp @@ -123,8 +123,10 @@ bool CHyprXWaylandManager::shouldBeFloated(PHLWINDOW pWindow, bool pending) { (SIZEHINTS && (SIZEHINTS->min_width == SIZEHINTS->max_width) && (SIZEHINTS->min_height == SIZEHINTS->max_height))) return true; } else { - const auto PSTATE = pending ? &pWindow->m_pXDGSurface->toplevel->pending : &pWindow->m_pXDGSurface->toplevel->current; + if (!pWindow->m_pXDGSurface || !pWindow->m_pXDGSurface->toplevel) + return false; + const auto PSTATE = pending ? &pWindow->m_pXDGSurface->toplevel->pending : &pWindow->m_pXDGSurface->toplevel->current; if (pWindow->m_pXDGSurface->toplevel->parent || (PSTATE->minSize.x != 0 && PSTATE->minSize.y != 0 && (PSTATE->minSize.x == PSTATE->maxSize.x || PSTATE->minSize.y == PSTATE->maxSize.y))) return true; |
