From 744d08af84dc7b912611e12543cb8734566ee153 Mon Sep 17 00:00:00 2001 From: Vaxry Date: Mon, 1 Jul 2024 13:06:23 +0200 Subject: [PATCH] avoid crash on monitor unplug --- src/events/Monitors.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/events/Monitors.cpp b/src/events/Monitors.cpp index bfa2a20e..e53401de 100644 --- a/src/events/Monitors.cpp +++ b/src/events/Monitors.cpp @@ -90,7 +90,7 @@ void Events::listener_monitorFrame(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) { if (m->output == pMonitor->output) {