From 29778152adc5cd81377a80cf606a1fae008e9bfc Mon Sep 17 00:00:00 2001 From: Hannah von Reth Date: Tue, 1 Oct 2019 11:23:12 +0200 Subject: [PATCH] Don't crash if we don't have a terminal Subscribers: kfm-devel Tags: #dolphin Differential Revision: https://phabricator.kde.org/D24337 --- src/dolphinmainwindow.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/dolphinmainwindow.cpp b/src/dolphinmainwindow.cpp index 5f7a8e7280..7099d58d3a 100644 --- a/src/dolphinmainwindow.cpp +++ b/src/dolphinmainwindow.cpp @@ -514,7 +514,7 @@ void DolphinMainWindow::closeEvent(QCloseEvent* event) } } - if (m_terminalPanel->hasProgramRunning() && GeneralSettings::confirmClosingTerminalRunningProgram() && closedByUser) { + if (m_terminalPanel && m_terminalPanel->hasProgramRunning() && GeneralSettings::confirmClosingTerminalRunningProgram() && closedByUser) { // Ask if the user really wants to quit Dolphin with a program that is still running in the Terminal panel // Open a confirmation dialog with 3 buttons: // QDialogButtonBox::Yes -> Quit