]> cloud.milkyroute.net Git - dolphin.git/commitdiff
Fix another crash if HAVE_TERMINAL is not defined
authorElvis Angelaccio <elvis.angelaccio@kde.org>
Tue, 1 Oct 2019 20:28:20 +0000 (22:28 +0200)
committerElvis Angelaccio <elvis.angelaccio@kde.org>
Tue, 1 Oct 2019 20:28:20 +0000 (22:28 +0200)
Inspired by 29778152ad.

src/dolphinmainwindow.cpp

index 7099d58d3a40342443fd6db92bf4e3254720ff8b..87f1e840499f035f24750b3a3686bcf4d65b63bf 100644 (file)
@@ -1189,7 +1189,7 @@ void DolphinMainWindow::updateWindowTitle()
 
 void DolphinMainWindow::slotStorageTearDownFromPlacesRequested(const QString& mountPath)
 {
-    if (m_terminalPanel->currentWorkingDirectory().startsWith(mountPath)) {
+    if (m_terminalPanel && m_terminalPanel->currentWorkingDirectory().startsWith(mountPath)) {
         m_tearDownFromPlacesRequested = true;
         m_terminalPanel->goHome();
         // m_placesPanel->proceedWithTearDown() will be called in slotTerminalDirectoryChanged
@@ -1200,7 +1200,7 @@ void DolphinMainWindow::slotStorageTearDownFromPlacesRequested(const QString& mo
 
 void DolphinMainWindow::slotStorageTearDownExternallyRequested(const QString& mountPath)
 {
-    if (m_terminalPanel->currentWorkingDirectory().startsWith(mountPath)) {
+    if (m_terminalPanel && m_terminalPanel->currentWorkingDirectory().startsWith(mountPath)) {
         m_tearDownFromPlacesRequested = false;
         m_terminalPanel->goHome();
     }