Commit fdfae256 authored by Nicolas Fella's avatar Nicolas Fella Committed by Kurt Hindenburg

Fix crash when closing session in KonsolePart via menu

This close method is also used when closing a Konsole session
via the X on the tabbar and tabheader.

FIXED-IN: 20.08.0
BUG: 420817
BUG: 420695
BUG: 415762

See merge request !87
parent 6d2924e3
......@@ -999,16 +999,23 @@ void SessionController::closeSession()
return;
}
if (confirmClose()) {
if (_session->closeInNormalWay()) {
if (!confirmClose()) {
return;
}
if (!_session->closeInNormalWay()) {
if (!confirmForceClose()) {
return;
} else if (confirmForceClose()) {
if (_session->closeInForceWay()) {
return;
} else {
qCDebug(KonsoleDebug) << "Konsole failed to close a session in any way.";
}
}
if (!_session->closeInForceWay()) {
qCDebug(KonsoleDebug) << "Konsole failed to close a session in any way.";
return;
}
}
if (factory()) {
factory()->removeClient(this);
}
}
......
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