drm: guard cursorFB buffer in restoreAfterVT (#100)

This commit is contained in:
Maximilian Seidler 2024-10-21 16:13:19 +00:00 committed by GitHub
parent e6ea0e0808
commit 8d732fa8af
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -331,7 +331,7 @@ void Aquamarine::CDRMBackend::restoreAfterVT() {
if (c->crtc->pendingCursor)
data.cursorFB = c->crtc->pendingCursor;
if (data.cursorFB && data.cursorFB->buffer->dmabuf().modifier == DRM_FORMAT_MOD_INVALID)
if (data.cursorFB && (data.cursorFB->dead || data.cursorFB->buffer->dmabuf().modifier == DRM_FORMAT_MOD_INVALID))
data.cursorFB = nullptr;
backend->log(AQ_LOG_DEBUG,