diff options
Diffstat (limited to 'core/dive.c')
-rw-r--r-- | core/dive.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/core/dive.c b/core/dive.c index 24fa8780d..7255416ac 100644 --- a/core/dive.c +++ b/core/dive.c @@ -753,6 +753,9 @@ void per_cylinder_mean_depth(const struct dive *dive, struct divecomputer *dc, i bool *used_cylinders; int num_used_cylinders; + if (dive->cylinders.nr <= 0) + return; + for (i = 0; i < dive->cylinders.nr; i++) mean[i] = duration[i] = 0; if (!dc) |