monitors: guard output when read
This commit is contained in:
parent
d9d57ce39a
commit
5d44ea802a
3 changed files with 12 additions and 0 deletions
|
|
@ -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();
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue