Commit 5aef4166 authored by Vlad Zahorodnii's avatar Vlad Zahorodnii
Browse files

backends/drm: Fix potential use-after-free

When the output is removed, there are legit cases when the connector can
be still accessed.

CCBUG: 457002
parent f0d59b07
......@@ -313,12 +313,12 @@ bool DrmGpu::updateOutputs()
for (const auto &output : qAsConst(addedOutputs)) {
const auto it = std::find_if(m_connectors.begin(), m_connectors.end(), [output](const auto &conn) {
return conn.get() == output->connector();
Q_ASSERT(it != m_connectors.end());
QTimer::singleShot(50, m_platform, &DrmBackend::updateOutputs);
} else {
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment