summaryrefslogtreecommitdiffstats
path: root/desktop-widgets/tab-widgets
diff options
context:
space:
mode:
Diffstat (limited to 'desktop-widgets/tab-widgets')
-rw-r--r--desktop-widgets/tab-widgets/TabDiveEquipment.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/desktop-widgets/tab-widgets/TabDiveEquipment.cpp b/desktop-widgets/tab-widgets/TabDiveEquipment.cpp
index 9399d3871..8a7fc63b5 100644
--- a/desktop-widgets/tab-widgets/TabDiveEquipment.cpp
+++ b/desktop-widgets/tab-widgets/TabDiveEquipment.cpp
@@ -130,7 +130,8 @@ void TabDiveEquipment::updateData()
suitModel.updateModel();
ui.cylinders->view()->hideColumn(CylindersModel::DEPTH);
- if (get_dive_dc(&displayed_dive, dc_number)->divemode == CCR)
+ bool is_ccr = current_dive && get_dive_dc(current_dive, dc_number)->divemode == CCR;
+ if (is_ccr)
ui.cylinders->view()->showColumn(CylindersModel::USE);
else
ui.cylinders->view()->hideColumn(CylindersModel::USE);