From 96f3a5eec287ac81e84ae0442d2f8a1945471420 Mon Sep 17 00:00:00 2001 From: Vlad Zahorodnii Date: Sun, 24 Jul 2022 12:13:59 +0300 Subject: [PATCH] backends/drm: Fix dangling connectors in m_allObjects We add connectors to m_allObjects but never remove them. CCBUG: 457002 --- src/backends/drm/drm_gpu.cpp | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/backends/drm/drm_gpu.cpp b/src/backends/drm/drm_gpu.cpp index 8f0fe8c4ca..0b6d1531cc 100644 --- a/src/backends/drm/drm_gpu.cpp +++ b/src/backends/drm/drm_gpu.cpp @@ -287,6 +287,7 @@ bool DrmGpu::updateOutputs() if (stillExists) { it++; } else { + m_allObjects.removeOne(it->get()); it = m_connectors.erase(it); } } @@ -318,6 +319,7 @@ bool DrmGpu::updateOutputs() return conn.get() == output->connector(); }); Q_ASSERT(it != m_connectors.end()); + m_allObjects.removeOne(it->get()); m_connectors.erase(it); } QTimer::singleShot(50, m_platform, &DrmBackend::updateOutputs);