renderer: fix invalid access on non-assigned surfaces

fixes #5125
This commit is contained in:
Vaxry 2024-03-15 21:29:20 +00:00
parent c4f52d1979
commit 2a2da6082e

View file

@ -75,7 +75,7 @@ static void renderSurface(struct wlr_surface* surface, int x, int y, void* data)
// however, if surface buffer w / h < box, we need to adjust them
auto* const PSURFACE = CWLSurface::surfaceFromWlr(surface);
const auto PWINDOW = PSURFACE->getWindow();
const auto PWINDOW = PSURFACE ? PSURFACE->getWindow() : nullptr;
if (PSURFACE && !PSURFACE->m_bFillIgnoreSmall && PSURFACE->small() /* guarantees PWINDOW */) {
const auto CORRECT = PSURFACE->correctSmallVec();