monitor desc default workspace but working now (#2678)
* fix desc check * fixes crashes when nulptr
This commit is contained in:
parent
26579fa962
commit
29d017f54b
2 changed files with 10 additions and 6 deletions
|
|
@ -495,17 +495,14 @@ CMonitor* CCompositor::getMonitorFromName(const std::string& name) {
|
|||
return m.get();
|
||||
}
|
||||
}
|
||||
|
||||
return nullptr;
|
||||
}
|
||||
|
||||
CMonitor* CCompositor::getMonitorFromDesc(const std::string& desc) {
|
||||
for (auto& m : m_vMonitors) {
|
||||
if (desc == m->output->description) {
|
||||
if (m->output->description && std::string(m->output->description).find(desc) == 0)
|
||||
return m.get();
|
||||
}
|
||||
}
|
||||
|
||||
return nullptr;
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue