diff options
author | vaxerski <[email protected]> | 2023-03-16 16:33:27 +0000 |
---|---|---|
committer | vaxerski <[email protected]> | 2023-03-16 16:33:27 +0000 |
commit | 4b52c1e68f8a29666935a92cc305afb6247f25e8 (patch) | |
tree | 659991872f16eeed470ad79baf9b9793630a6679 | |
parent | e77ebec62990db725a67267582d1b84cefa11497 (diff) | |
download | Hyprland-4b52c1e68f8a29666935a92cc305afb6247f25e8.tar.gz Hyprland-4b52c1e68f8a29666935a92cc305afb6247f25e8.zip |
monitors: remove from monitors on unsafe
-rw-r--r-- | src/helpers/Monitor.cpp | 2 |
1 files changed, 2 insertions, 0 deletions
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<CMonitor>& el) { return el.get() == this; }); + return; } |