aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--desktop-widgets/divelistview.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/desktop-widgets/divelistview.cpp b/desktop-widgets/divelistview.cpp
index a50c81756..cbd238927 100644
--- a/desktop-widgets/divelistview.cpp
+++ b/desktop-widgets/divelistview.cpp
@@ -779,7 +779,7 @@ void DiveListView::contextMenuEvent(QContextMenuEvent *event)
popup.addAction(tr("Collapse all"), this, &QTreeView::collapseAll);
// verify if there`s a need for collapse others
- if (expanded_nodes > 1 && d->divetrip)
+ if (expanded_nodes > 1 && (trip || (d && d->divetrip)))
collapseAction = popup.addAction(tr("Collapse others"), this, &QTreeView::collapseAll);