┌   ┐
54
└   ┘

summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorHarald Sitter <[email protected]>2021-01-20 15:29:04 +0100
committerHarald Sitter <[email protected]>2021-01-25 10:12:53 +0100
commit5ed12ed44a7169855d46486d17c3e18697c3c4ae (patch)
tree65a1619b80b182dd81dd899bcfae26cfc7a97546 /src
parent33270dd4423eea329b8f20db17f8d70ab7b108da (diff)
don't crash when building without baloo
show_information_panel is only created when building with baloo. only access it when built with baloo, otherwise always report the panel as off. this fixes a nullptr deref because action() would return a nullptr since show_information_panel isn't a thing in all build configurations (full disclosure: I can't reproduce the crash, nor did I build without baloo) BUG: 431730
Diffstat (limited to 'src')
-rw-r--r--src/dolphinmainwindow.cpp4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/dolphinmainwindow.cpp b/src/dolphinmainwindow.cpp
index 5a5319383..71d3ca033 100644
--- a/src/dolphinmainwindow.cpp
+++ b/src/dolphinmainwindow.cpp
@@ -258,7 +258,11 @@ bool DolphinMainWindow::isFoldersPanelEnabled() const
bool DolphinMainWindow::isInformationPanelEnabled() const
{
+#ifdef HAVE_BALOO
return actionCollection()->action(QStringLiteral("show_information_panel"))->isChecked();
+#else
+ return false;
+#endif
}
void DolphinMainWindow::openFiles(const QStringList& files, bool splitView)