workspace: prevent dangling pointers in output order list
An output can be still enabled but also scheduled for deletion
This commit is contained in:
parent
c51824b535
commit
062f092f38
1 changed files with 2 additions and 2 deletions
|
@ -1325,8 +1325,8 @@ void Workspace::updateOutputs(const QVector<Output *> &outputOrder)
|
||||||
m_outputOrder.push_back(output);
|
m_outputOrder.push_back(output);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
m_outputOrder.erase(std::remove_if(m_outputOrder.begin(), m_outputOrder.end(), [](Output *output) {
|
m_outputOrder.erase(std::remove_if(m_outputOrder.begin(), m_outputOrder.end(), [this](Output *output) {
|
||||||
return !output->isEnabled();
|
return !m_outputs.contains(output);
|
||||||
}),
|
}),
|
||||||
m_outputOrder.end());
|
m_outputOrder.end());
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue