From dde7a2efac1f5ad9f1d9b913d8e355ce53a7ed37 Mon Sep 17 00:00:00 2001 From: Xaver Hugl Date: Thu, 16 Dec 2021 16:44:01 +0100 Subject: [PATCH] backends/drm: fix crash with direct scanout BUG: 447079 --- src/backends/drm/egl_gbm_backend.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/backends/drm/egl_gbm_backend.cpp b/src/backends/drm/egl_gbm_backend.cpp index 64905bba59..5ee60fea0a 100644 --- a/src/backends/drm/egl_gbm_backend.cpp +++ b/src/backends/drm/egl_gbm_backend.cpp @@ -624,7 +624,9 @@ bool EglGbmBackend::scanout(AbstractOutput *drmOutput, SurfaceItem *surfaceItem) return false; } if (output.oldScanoutCandidate && output.oldScanoutCandidate != surface) { - output.oldScanoutCandidate->dmabufFeedbackV1()->setTranches({}); + if (output.oldScanoutCandidate->dmabufFeedbackV1()) { + output.oldScanoutCandidate->dmabufFeedbackV1()->setTranches({}); + } output.oldScanoutCandidate = nullptr; } output.scanoutCandidate = surface;