Commit 62a5f1d7 authored by Kurt Hindenburg's avatar Kurt Hindenburg
Browse files

Fix crash on "Close Current Tab" handling

_pluggedController disconnection happens  when session is closed
by closeInNormalWay or closeInForceWay and calling
disconnectController leads to Konsole crash.   Also a case when
closeInNormalWay is false was not considered.

BUG: 410607
FIXED-IN: 19.08.1

Test Plan:
1. Open Konsole
2. Open one more tab
3. Try to close Konsole
4. Pick option "Close Current Tab" (assuming you have not check
    'Do not ask again')

Reviewers: #konsole, hindenburg

Reviewed By: #konsole, hindenburg

Subscribers: hindenburg, konsole-devel, #konsole

Tags: #konsole

Differential Revision:
parent dc29be39
......@@ -666,8 +666,11 @@ bool MainWindow::queryClose()
return true;
case KMessageBox::No:
if ((!_pluggedController.isNull()) && (!_pluggedController->session().isNull())) {
if (!(_pluggedController->session()->closeInNormalWay())) {
if (_pluggedController->confirmForceClose()) {
return false;
case KMessageBox::Cancel:
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