Commit 13684beb authored by Martin Tobias Holmedahl Sandsmark's avatar Martin Tobias Holmedahl Sandsmark
Browse files

Fix crash when failing to restore session

REVIEW: 128670
BUG: 366217
parent 69c8a0e3
......@@ -941,6 +941,14 @@ void ViewManager::restoreSessions(const KConfigGroup& group)
int tab = 1;
foreach(int id, ids) {
Session* session = SessionManager::instance()->idToSession(id);
if (!session) {
qWarning() << "Unable to load session with id" << id;
// Force a creation of a default session below
ids.clear();
break;
}
createView(session);
if (!session->isRunning())
session->run();
......
Supports Markdown
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