platforms/drm: only delete outputs if not pre-existing

When there aren't enough CRTCs to drive all the outputs this could
delete existing outputs.
This commit is contained in:
Xaver Hugl 2021-09-09 11:31:01 +02:00
parent b89f04943c
commit a0a98d0b31

View file

@ -340,8 +340,10 @@ bool DrmGpu::commitCombination(const QVector<DrmPipeline *> &pipelines)
return true;
} else {
for (const auto &pipeline : qAsConst(pipelines)) {
Q_EMIT outputDisabled(pipeline->output());
delete pipeline->output();
if (!m_outputs.contains(pipeline->output())) {
Q_EMIT outputDisabled(pipeline->output());
delete pipeline->output();
}
}
return false;
}