From 83d3babd4e703156b89fcec5bb64390306902f6e Mon Sep 17 00:00:00 2001 From: Vaxry <43317083+vaxerski@users.noreply.github.com> Date: Sat, 28 Mar 2026 17:38:10 -0400 Subject: desktop/reserved: do not crash on invalid box init (#13880) ref #13879 --- src/desktop/view/Window.cpp | 3 +++ 1 file changed, 3 insertions(+) (limited to 'src/desktop/view/Window.cpp') diff --git a/src/desktop/view/Window.cpp b/src/desktop/view/Window.cpp index 287440e8..2a388d68 100644 --- a/src/desktop/view/Window.cpp +++ b/src/desktop/view/Window.cpp @@ -285,6 +285,9 @@ CBox CWindow::getWindowIdealBoundingBoxIgnoreReserved() { const auto WORKAREA = m_workspace->m_space->workArea(); const auto& RESERVED = CReservedArea(PMONITOR->logicalBox(), WORKAREA); + if (!RESERVED.ok()) + return CBox{POS, SIZE}; + if (DELTALESSTHAN(POS.x, WORKAREA.x, 1)) { POS.x -= RESERVED.left(); SIZE.x += RESERVED.left(); -- cgit v1.2.3