mirror of
https://github.com/hyprwm/Hyprland
synced 2025-12-20 07:10:02 +01:00
protocols/compositor: fix null deref on unassigned surface image desc
ref #12603
This commit is contained in:
parent
920353370b
commit
efe665b455
1 changed files with 1 additions and 1 deletions
|
|
@ -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();
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue