monitor: avoid crash on released buffer in surf

This commit is contained in:
Vaxry 2024-10-19 23:48:25 +01:00
parent a17850e41c
commit 08cc063e17

View file

@ -845,7 +845,7 @@ bool CMonitor::attemptDirectScanout() {
return false; return false;
// we can't scanout shm buffers. // 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; return false;
Debug::log(TRACE, "attemptDirectScanout: surface {:x} passed, will attempt", (uintptr_t)PSURFACE.get()); Debug::log(TRACE, "attemptDirectScanout: surface {:x} passed, will attempt", (uintptr_t)PSURFACE.get());