summaryrefslogtreecommitdiff
path: root/src/Window.cpp
diff options
context:
space:
mode:
authorvaxerski <43317083+vaxerski@users.noreply.github.com>2023-07-23 16:02:35 +0200
committervaxerski <43317083+vaxerski@users.noreply.github.com>2023-07-23 16:02:35 +0200
commit90f69782ee64d35c4b0f38985c00c40595224088 (patch)
tree6192db3b9db039d9968cd72cd49003d15b61e71f /src/Window.cpp
parent5a64c73e053f4566b8c4b03587b01d6007fb5412 (diff)
window: fix segfault in boundingbox
Diffstat (limited to 'src/Window.cpp')
-rw-r--r--src/Window.cpp4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/Window.cpp b/src/Window.cpp
index 233a1088..b6a357fa 100644
--- a/src/Window.cpp
+++ b/src/Window.cpp
@@ -25,7 +25,9 @@ CWindow::~CWindow() {
wlr_box CWindow::getFullWindowBoundingBox() {
static auto* const PBORDERSIZE = &g_pConfigManager->getConfigValuePtr("general:border_size")->intValue;
- const auto WORKSPACERULE = g_pConfigManager->getWorkspaceRuleFor(g_pCompositor->getWorkspaceByID(m_iWorkspaceID));
+ const auto PWORKSPACE = g_pCompositor->getWorkspaceByID(m_iWorkspaceID);
+
+ const auto WORKSPACERULE = PWORKSPACE ? g_pConfigManager->getWorkspaceRuleFor(PWORKSPACE) : SWorkspaceRule{};
auto borderSize = m_sSpecialRenderData.borderSize.toUnderlying() != -1 ? m_sSpecialRenderData.borderSize.toUnderlying() : WORKSPACERULE.borderSize.value_or(*PBORDERSIZE);
if (m_sAdditionalConfigData.borderSize.toUnderlying() != -1)