summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--profile.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/profile.c b/profile.c
index 0f90370f0..453da991a 100644
--- a/profile.c
+++ b/profile.c
@@ -496,6 +496,9 @@ static inline int pressure_time(struct dive *dive, struct divecomputer *dc, stru
int time = b->sec - a->sec;
int depth = (a->depth + b->depth)/2;
+ if (depth <= SURFACE_THRESHOLD)
+ return 0;
+
return depth_to_mbar(depth, dive) * time;
}