From 1f92dc5e5d36df00ec129d554203951047d34a73 Mon Sep 17 00:00:00 2001 From: Xaver Hugl Date: Sat, 1 Oct 2022 20:57:33 +0200 Subject: [PATCH] backends/drm: correct test buffer check There can be situations where the surface fits but there's no test buffer yet --- src/backends/drm/drm_egl_layer.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/backends/drm/drm_egl_layer.cpp b/src/backends/drm/drm_egl_layer.cpp index 7ba07fbae5..b9e7c09fc5 100644 --- a/src/backends/drm/drm_egl_layer.cpp +++ b/src/backends/drm/drm_egl_layer.cpp @@ -68,7 +68,7 @@ QRegion EglGbmLayer::currentDamage() const bool EglGbmLayer::checkTestBuffer() { - if (!m_surface.doesSurfaceFit(m_pipeline->bufferSize(), m_pipeline->formats())) { + if (!m_currentBuffer || !m_surface.doesSurfaceFit(m_pipeline->bufferSize(), m_pipeline->formats())) { const auto buffer = m_surface.renderTestBuffer(m_pipeline->bufferSize(), m_pipeline->formats()); if (!buffer) { return false;