backends/drm: Fix dangling connectors in m_allObjects

We add connectors to m_allObjects but never remove them.

CCBUG: 457002
This commit is contained in:
Vlad Zahorodnii 2022-07-24 12:13:59 +03:00
parent 5aef41663a
commit 96f3a5eec2

View file

@ -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);