master: guard monitor in recalc

This commit is contained in:
vaxerski 2023-05-26 13:41:52 +02:00
parent 9c9b74179c
commit 62e3953f5b

View file

@ -200,6 +200,10 @@ void CHyprMasterLayout::onWindowRemovedTiling(CWindow* pWindow) {
void CHyprMasterLayout::recalculateMonitor(const int& monid) {
const auto PMONITOR = g_pCompositor->getMonitorFromID(monid);
if (!PMONITOR)
return;
const auto PWORKSPACE = g_pCompositor->getWorkspaceByID(PMONITOR->activeWorkspace);
if (!PWORKSPACE)