monitor: avoid crash on expired special workspace monitor owner
fixes #9477
This commit is contained in:
parent
f148b96bea
commit
11943f761e
1 changed files with 5 additions and 5 deletions
|
|
@ -1124,12 +1124,12 @@ void CMonitor::setSpecialWorkspace(const PHLWORKSPACE& pWorkspace) {
|
||||||
bool animate = true;
|
bool animate = true;
|
||||||
//close if open elsewhere
|
//close if open elsewhere
|
||||||
const auto PMONITORWORKSPACEOWNER = pWorkspace->m_pMonitor.lock();
|
const auto PMONITORWORKSPACEOWNER = pWorkspace->m_pMonitor.lock();
|
||||||
if (PMONITORWORKSPACEOWNER->activeSpecialWorkspace == pWorkspace) {
|
if (const auto PMWSOWNER = pWorkspace->m_pMonitor.lock(); PMWSOWNER && PMWSOWNER->activeSpecialWorkspace == pWorkspace) {
|
||||||
PMONITORWORKSPACEOWNER->activeSpecialWorkspace.reset();
|
PMWSOWNER->activeSpecialWorkspace.reset();
|
||||||
g_pLayoutManager->getCurrentLayout()->recalculateMonitor(PMONITORWORKSPACEOWNER->ID);
|
g_pLayoutManager->getCurrentLayout()->recalculateMonitor(PMWSOWNER->ID);
|
||||||
g_pEventManager->postEvent(SHyprIPCEvent{"activespecial", "," + PMONITORWORKSPACEOWNER->szName});
|
g_pEventManager->postEvent(SHyprIPCEvent{"activespecial", "," + PMWSOWNER->szName});
|
||||||
|
|
||||||
const auto PACTIVEWORKSPACE = PMONITORWORKSPACEOWNER->activeWorkspace;
|
const auto PACTIVEWORKSPACE = PMWSOWNER->activeWorkspace;
|
||||||
g_pCompositor->updateFullscreenFadeOnWorkspace(PACTIVEWORKSPACE);
|
g_pCompositor->updateFullscreenFadeOnWorkspace(PACTIVEWORKSPACE);
|
||||||
|
|
||||||
animate = false;
|
animate = false;
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue