diff options
| author | vaxerski <43317083+vaxerski@users.noreply.github.com> | 2023-03-16 14:03:40 +0000 |
|---|---|---|
| committer | vaxerski <43317083+vaxerski@users.noreply.github.com> | 2023-03-16 14:03:40 +0000 |
| commit | 5d44ea802a604edfcc822c9f2376bb3881f3e805 (patch) | |
| tree | d7100204861d272e83f099937c855ef8d6c7e029 /src/config/ConfigManager.cpp | |
| parent | d9d57ce39ac25fd8bbfe88ec9d3bccb1e2df8650 (diff) | |
monitors: guard output when read
Diffstat (limited to 'src/config/ConfigManager.cpp')
| -rw-r--r-- | src/config/ConfigManager.cpp | 6 |
1 files changed, 6 insertions, 0 deletions
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); |
