diff options
-rw-r--r-- | desktop-widgets/tab-widgets/TabDiveInformation.cpp | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/desktop-widgets/tab-widgets/TabDiveInformation.cpp b/desktop-widgets/tab-widgets/TabDiveInformation.cpp index f7d16fe26..f787c922e 100644 --- a/desktop-widgets/tab-widgets/TabDiveInformation.cpp +++ b/desktop-widgets/tab-widgets/TabDiveInformation.cpp @@ -128,7 +128,8 @@ void TabDiveInformation::updateProfile() volume_t *gases = get_gas_used(current_dive); QString volumes; std::vector<int> mean(current_dive->cylinders.nr), duration(current_dive->cylinders.nr); - per_cylinder_mean_depth(current_dive, select_dc(current_dive), &mean[0], &duration[0]); + if (current_dive->cylinders.nr >= 0) + per_cylinder_mean_depth(current_dive, select_dc(current_dive), mean.data(), duration.data()); volume_t sac; QString gaslist, SACs, separator; |