protocols/dmabuf: handle null pointer in CLinuxDMABufV1Protocol::resetFormatTable (#12207)

This commit is contained in:
André Silva 2025-11-04 15:13:50 +00:00 committed by GitHub
parent 8e9add2afd
commit d82538c69f
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -507,13 +507,17 @@ void CLinuxDMABufV1Protocol::resetFormatTable() {
if (feedback->m_lastFeedbackWasScanout) {
PHLMONITOR mon;
auto HLSurface = CWLSurface::fromResource(feedback->m_surface);
if (!HLSurface) {
feedback->sendDefaultFeedback();
continue;
}
if (auto w = HLSurface->getWindow(); w)
if (auto m = w->m_monitor.lock(); m)
mon = m->m_self.lock();
if (!mon) {
feedback->sendDefaultFeedback();
return;
continue;
}
updateScanoutTranche(feedback->m_surface, mon);