From 08cc063e175e48cea44d26b7e3762f4b8611f0c5 Mon Sep 17 00:00:00 2001 From: Vaxry Date: Sat, 19 Oct 2024 23:48:25 +0100 Subject: [PATCH] monitor: avoid crash on released buffer in surf --- src/helpers/Monitor.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/helpers/Monitor.cpp b/src/helpers/Monitor.cpp index 6ded5ea4..d8889585 100644 --- a/src/helpers/Monitor.cpp +++ b/src/helpers/Monitor.cpp @@ -845,7 +845,7 @@ bool CMonitor::attemptDirectScanout() { return false; // we can't scanout shm buffers. - if (!PSURFACE->current.buffer || !PSURFACE->current.texture || !PSURFACE->current.texture->m_pEglImage /* dmabuf */) + if (!PSURFACE->current.buffer || !PSURFACE->current.buffer->buffer || !PSURFACE->current.texture || !PSURFACE->current.texture->m_pEglImage /* dmabuf */) return false; Debug::log(TRACE, "attemptDirectScanout: surface {:x} passed, will attempt", (uintptr_t)PSURFACE.get());