mirror of
https://github.com/KDE/konsole.git
synced 2026-06-11 07:26:10 -04:00
Fix crash when failing to restore session
REVIEW: 128670 BUG: 366217
This commit is contained in:
@@ -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();
|
||||
|
||||
Reference in New Issue
Block a user