backends/drm: fix crash with direct scanout

BUG: 447079
This commit is contained in:
Xaver Hugl 2021-12-16 16:44:01 +01:00
parent 1d0e75bc5c
commit dde7a2efac

View file

@ -624,7 +624,9 @@ bool EglGbmBackend::scanout(AbstractOutput *drmOutput, SurfaceItem *surfaceItem)
return false; return false;
} }
if (output.oldScanoutCandidate && output.oldScanoutCandidate != surface) { if (output.oldScanoutCandidate && output.oldScanoutCandidate != surface) {
output.oldScanoutCandidate->dmabufFeedbackV1()->setTranches({}); if (output.oldScanoutCandidate->dmabufFeedbackV1()) {
output.oldScanoutCandidate->dmabufFeedbackV1()->setTranches({});
}
output.oldScanoutCandidate = nullptr; output.oldScanoutCandidate = nullptr;
} }
output.scanoutCandidate = surface; output.scanoutCandidate = surface;