platforms/drm: remove dangling pointer of lease outputs pipeline
This commit is contained in:
parent
66badd905b
commit
bcbba62c7c
1 changed files with 7 additions and 0 deletions
|
@ -304,6 +304,8 @@ bool DrmGpu::updateOutputs()
|
||||||
connectors.removeOne(output->pipeline()->connector());
|
connectors.removeOne(output->pipeline()->connector());
|
||||||
crtcs.removeOne(output->pipeline()->crtc());
|
crtcs.removeOne(output->pipeline()->crtc());
|
||||||
planes.removeOne(output->pipeline()->primaryPlane());
|
planes.removeOne(output->pipeline()->primaryPlane());
|
||||||
|
} else {
|
||||||
|
m_pipelines.removeOne(output->pipeline());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
auto config = findWorkingCombination({}, connectors, crtcs, planes);
|
auto config = findWorkingCombination({}, connectors, crtcs, planes);
|
||||||
|
@ -313,6 +315,11 @@ bool DrmGpu::updateOutputs()
|
||||||
it.value()->setOutput(it.key());
|
it.value()->setOutput(it.key());
|
||||||
config << it.value();
|
config << it.value();
|
||||||
}
|
}
|
||||||
|
for (const auto &leaseOutput : qAsConst(m_leaseOutputs)) {
|
||||||
|
if (!leaseOutput->lease()) {
|
||||||
|
config << leaseOutput->pipeline();
|
||||||
|
}
|
||||||
|
}
|
||||||
} else {
|
} else {
|
||||||
for (const auto &pipeline : qAsConst(oldPipelines)) {
|
for (const auto &pipeline : qAsConst(oldPipelines)) {
|
||||||
delete pipeline;
|
delete pipeline;
|
||||||
|
|
Loading…
Reference in a new issue