From 4b52c1e68f8a29666935a92cc305afb6247f25e8 Mon Sep 17 00:00:00 2001 From: vaxerski <43317083+vaxerski@users.noreply.github.com> Date: Thu, 16 Mar 2023 16:33:27 +0000 Subject: [PATCH] monitors: remove from monitors on unsafe --- src/helpers/Monitor.cpp | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/helpers/Monitor.cpp b/src/helpers/Monitor.cpp index 621b2889..f97c386d 100644 --- a/src/helpers/Monitor.cpp +++ b/src/helpers/Monitor.cpp @@ -214,6 +214,8 @@ void CMonitor::onDisconnect() { g_pCompositor->m_bUnsafeState = true; + std::erase_if(g_pCompositor->m_vMonitors, [&](std::shared_ptr& el) { return el.get() == this; }); + return; }