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/Compositor.cpp | |
| parent | d9d57ce39ac25fd8bbfe88ec9d3bccb1e2df8650 (diff) | |
monitors: guard output when read
Diffstat (limited to 'src/Compositor.cpp')
| -rw-r--r-- | src/Compositor.cpp | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/src/Compositor.cpp b/src/Compositor.cpp index 0c3e480f..d2d84f9d 100644 --- a/src/Compositor.cpp +++ b/src/Compositor.cpp @@ -1836,6 +1836,9 @@ CMonitor* CCompositor::getMonitorFromString(const std::string& name) { const auto DESCRIPTION = name.substr(5); for (auto& m : m_vMonitors) { + if (!m->output) + continue; + if (m->output->description && std::string(m->output->description).find(DESCRIPTION) == 0) { return m.get(); } |
