avoid crash on monitor unplug

This commit is contained in:
Vaxry 2024-07-01 13:06:23 +02:00
parent 93c35602ca
commit 36ac7e6c76

View file

@ -90,7 +90,7 @@ void Events::listener_monitorFrame(void* owner, void* data) {
} }
void Events::listener_monitorDestroy(void* owner, void* data) { void Events::listener_monitorDestroy(void* owner, void* data) {
CMonitor* pMonitor = nullptr; CMonitor* pMonitor = (CMonitor*)owner;
for (auto& m : g_pCompositor->m_vRealMonitors) { for (auto& m : g_pCompositor->m_vRealMonitors) {
if (m->output == pMonitor->output) { if (m->output == pMonitor->output) {