diff options
| author | vaxerski <43317083+vaxerski@users.noreply.github.com> | 2022-06-30 16:00:44 +0200 |
|---|---|---|
| committer | vaxerski <43317083+vaxerski@users.noreply.github.com> | 2022-06-30 16:00:44 +0200 |
| commit | 97b515edb7529b9567bef2a1d7bd31f4ae9222ea (patch) | |
| tree | 20d4ed2b9fc1a68eb54d3b110a232fcb81463ea2 /src/Compositor.cpp | |
| parent | 328b3fa4bc4f3776f2128f84709556569c4824d9 (diff) | |
fix crash
Diffstat (limited to 'src/Compositor.cpp')
| -rw-r--r-- | src/Compositor.cpp | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/src/Compositor.cpp b/src/Compositor.cpp index d0107f57..20a4add4 100644 --- a/src/Compositor.cpp +++ b/src/Compositor.cpp @@ -680,10 +680,16 @@ CWorkspace* CCompositor::getWorkspaceByID(const int& id) { void CCompositor::sanityCheckWorkspaces() { for (auto it = m_vWorkspaces.begin(); it != m_vWorkspaces.end(); ++it) { + if (!it->get()) + return; // why does this occur when switching from an empty workspace to an open one? + if ((getWindowsOnWorkspace((*it)->m_iID) == 0 && !isWorkspaceVisible((*it)->m_iID))) { it = m_vWorkspaces.erase(it); } + if (it == m_vWorkspaces.end()) + continue; + if ((*it)->m_iID == SPECIAL_WORKSPACE_ID && getWindowsOnWorkspace((*it)->m_iID) == 0) { for (auto& m : m_vMonitors) { m->specialWorkspaceOpen = false; |
