summaryrefslogtreecommitdiff
path: root/src/layout/MasterLayout.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/layout/MasterLayout.cpp')
-rw-r--r--src/layout/MasterLayout.cpp6
1 files changed, 5 insertions, 1 deletions
diff --git a/src/layout/MasterLayout.cpp b/src/layout/MasterLayout.cpp
index fcd8c900..f1e6b858 100644
--- a/src/layout/MasterLayout.cpp
+++ b/src/layout/MasterLayout.cpp
@@ -199,7 +199,11 @@ void CHyprMasterLayout::onWindowRemovedTiling(CWindow* pWindow) {
}
void CHyprMasterLayout::recalculateMonitor(const int& monid) {
- const auto PMONITOR = g_pCompositor->getMonitorFromID(monid);
+ const auto PMONITOR = g_pCompositor->getMonitorFromID(monid);
+
+ if (!PMONITOR)
+ return;
+
const auto PWORKSPACE = g_pCompositor->getWorkspaceByID(PMONITOR->activeWorkspace);
if (!PWORKSPACE)