1
mirror of https://invent.kde.org/network/falkon.git synced 2024-12-19 18:26:34 +01:00

Fix crash when starting new session after crash

BUG: 408701
FIXED-IN: 23.08.4

Signed-off-by: Juraj Oravec <jurajoravec@mailo.com>
This commit is contained in:
Juraj Oravec 2023-11-23 20:37:28 +01:00
parent 5ab952e68f
commit 36b13e452d
Signed by: SGOrava
GPG Key ID: 13660A3F1D9F093B

View File

@ -74,7 +74,18 @@ QJsonArray RecoveryJsObject::restoreData() const
void RecoveryJsObject::startNewSession()
{
closeTab();
auto *view = qobject_cast<TabbedWebView*>(m_page->view());
if (!view) {
return;
}
if (view->browserWindow()->tabCount() > 1) {
view->closeView();
} else {
auto *oldWindow = view->browserWindow();
mApp->createWindow(Qz::BW_NewWindow);
oldWindow->close();
}
mApp->restoreManager()->clearRestoreData();
mApp->destroyRestoreManager();