core: nullcheck for old monitor in moveWorkspaceToMonitor

fixes #4495
This commit is contained in:
Vaxry 2024-02-26 21:12:12 +00:00
parent f7a3453487
commit bc3f5b94eb

View file

@ -2182,7 +2182,7 @@ void CCompositor::moveWorkspaceToMonitor(CWorkspace* pWorkspace, CMonitor* pMoni
// fix old mon // fix old mon
int nextWorkspaceOnMonitorID = -1; int nextWorkspaceOnMonitorID = -1;
if (!SWITCHINGISACTIVE) if (!SWITCHINGISACTIVE || !POLDMON)
nextWorkspaceOnMonitorID = pWorkspace->m_iID; nextWorkspaceOnMonitorID = pWorkspace->m_iID;
else { else {
for (auto& w : m_vWorkspaces) { for (auto& w : m_vWorkspaces) {