Commit f12c2e3b authored by Christoph Cullmann's avatar Christoph Cullmann

avoid crash on re-open already running session

just quit kate
do check all return values properly

BUG: 390740
parent 5d20fee8
...@@ -408,16 +408,15 @@ bool KateSessionManager::chooseSession() ...@@ -408,16 +408,15 @@ bool KateSessionManager::chooseSession()
// uhh, just open last used session, show no chooser // uhh, just open last used session, show no chooser
if (sesStart == QStringLiteral("last")) { if (sesStart == QStringLiteral("last")) {
activateSession(lastSession, false); return activateSession(lastSession, false);
return true;
} }
// start with empty new session or in case no sessions exist // start with empty new session or in case no sessions exist
if (sesStart == QStringLiteral("new") || sessionList().size() == 0) { if (sesStart == QStringLiteral("new") || sessionList().size() == 0) {
activateAnonymousSession(); return activateAnonymousSession();
return true;
} }
// else: ask the user
return QScopedPointer<KateSessionManageDialog>(new KateSessionManageDialog(nullptr, lastSession))->exec(); return QScopedPointer<KateSessionManageDialog>(new KateSessionManageDialog(nullptr, lastSession))->exec();
} }
......
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