diff options
| author | vaxerski <43317083+vaxerski@users.noreply.github.com> | 2023-05-26 13:41:52 +0200 |
|---|---|---|
| committer | vaxerski <43317083+vaxerski@users.noreply.github.com> | 2023-05-26 13:41:52 +0200 |
| commit | 62e3953f5b2274fdb6c41bee079513c5c622234c (patch) | |
| tree | 41503358ab1fd369dea5572ae49e9c7af3bc812b /src/layout/MasterLayout.cpp | |
| parent | 9c9b74179c3f3288266cedb7c31c16e12efff16c (diff) | |
master: guard monitor in recalc
Diffstat (limited to 'src/layout/MasterLayout.cpp')
| -rw-r--r-- | src/layout/MasterLayout.cpp | 6 |
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) |
