From efe665b4558370af6e89921c487cd92890183961 Mon Sep 17 00:00:00 2001 From: Vaxry Date: Mon, 8 Dec 2025 22:49:53 +0000 Subject: [PATCH] protocols/compositor: fix null deref on unassigned surface image desc ref #12603 --- src/protocols/core/Compositor.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/protocols/core/Compositor.cpp b/src/protocols/core/Compositor.cpp index 44f95943..2177c68f 100644 --- a/src/protocols/core/Compositor.cpp +++ b/src/protocols/core/Compositor.cpp @@ -558,7 +558,7 @@ void CWLSurfaceResource::commitState(SSurfaceState& state) { SImageDescription CWLSurfaceResource::getPreferredImageDescription() { static const auto PFORCE_HDR = CConfigValue("quirks:prefer_hdr"); - const auto WINDOW = Desktop::View::CWindow::fromView(m_hlSurface->view()); + const auto WINDOW = m_hlSurface ? Desktop::View::CWindow::fromView(m_hlSurface->view()) : nullptr; if (*PFORCE_HDR == 1 || (*PFORCE_HDR == 2 && m_hlSurface && WINDOW && WINDOW->m_class == "gamescope")) return g_pCompositor->getHDRImageDescription();