Commit 48d3a525 authored by Christoph Cullmann's avatar Christoph Cullmann 🐮
Browse files

fix sessions segfault because of invalid iterator

BUG: 446863
parent 3e26d473
Pipeline #108838 passed with stage
in 3 minutes and 15 seconds
......@@ -83,10 +83,12 @@ void KateSessionManager::updateSessionList()
}
// Remove gone sessions from our list
for (auto it = m_sessions.cbegin(); it != m_sessions.cend(); ++it) {
for (auto it = m_sessions.begin(); it != m_sessions.end();) {
if (list.indexOf(it.key()) < 0 && it.value() != activeSession()) {
m_sessions.remove(it.key());
it = m_sessions.erase(it);
changed = true;
} else {
++it;
}
}
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment