From 5d44ea802a604edfcc822c9f2376bb3881f3e805 Mon Sep 17 00:00:00 2001 From: vaxerski <43317083+vaxerski@users.noreply.github.com> Date: Thu, 16 Mar 2023 14:03:40 +0000 Subject: monitors: guard output when read --- src/config/ConfigManager.cpp | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'src/config/ConfigManager.cpp') diff --git a/src/config/ConfigManager.cpp b/src/config/ConfigManager.cpp index c0f2d5c1..4cfd89b6 100644 --- a/src/config/ConfigManager.cpp +++ b/src/config/ConfigManager.cpp @@ -1761,6 +1761,9 @@ bool CConfigManager::shouldBlurLS(const std::string& ns) { void CConfigManager::ensureDPMS() { for (auto& rm : g_pCompositor->m_vRealMonitors) { + if (!rm->output) + continue; + auto rule = getMonitorRuleFor(rm->szName, rm->output->description ? rm->output->description : ""); if (rule.disabled == rm->m_bEnabled) { @@ -1774,6 +1777,9 @@ void CConfigManager::ensureVRR(CMonitor* pMonitor) { static auto* const PVRR = &getConfigValuePtr("misc:vrr")->intValue; static auto ensureVRRForDisplay = [&](CMonitor* m) -> void { + if (!m->output) + return; + if (*PVRR == 0) { if (m->vrrActive) { wlr_output_enable_adaptive_sync(m->output, 0); -- cgit v1.2.3