diff options
| author | Vaxry <vaxry@vaxry.net> | 2025-12-08 22:49:53 +0000 |
|---|---|---|
| committer | Vaxry <vaxry@vaxry.net> | 2025-12-08 22:49:53 +0000 |
| commit | efe665b4558370af6e89921c487cd92890183961 (patch) | |
| tree | dfa99cd14f247f51c1d63b71b12111be494eb29d /src/protocols/core/Compositor.cpp | |
| parent | 920353370bba555010506a1c0b204675c60362fe (diff) | |
protocols/compositor: fix null deref on unassigned surface image desc
ref #12603
Diffstat (limited to 'src/protocols/core/Compositor.cpp')
| -rw-r--r-- | src/protocols/core/Compositor.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
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<Hyprlang::INT>("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(); |
