summaryrefslogtreecommitdiffstats
path: root/core/gaspressures.c
diff options
context:
space:
mode:
Diffstat (limited to 'core/gaspressures.c')
-rw-r--r--core/gaspressures.c20
1 files changed, 10 insertions, 10 deletions
diff --git a/core/gaspressures.c b/core/gaspressures.c
index 13196b61f..ce88df047 100644
--- a/core/gaspressures.c
+++ b/core/gaspressures.c
@@ -409,16 +409,6 @@ void populate_pressure_information(struct dive *dive, struct divecomputer *dc, s
current->end = pressure;
}
- // If we have no pressure information, we will need to
- // continue with or without a tracking entry. Mark any
- // existing tracking entry as non-dense, and remember
- // to fill in interpolated data.
- if (!pressure) {
- missing_pr = 1;
- dense = 0;
- continue;
- }
-
// We have a final pressure for 'current'
// If a gas switch has occurred, finish the
// current pressure track entry and continue
@@ -429,6 +419,16 @@ void populate_pressure_information(struct dive *dive, struct divecomputer *dc, s
continue;
}
+ // If we have no pressure information, we will need to
+ // continue with or without a tracking entry. Mark any
+ // existing tracking entry as non-dense, and remember
+ // to fill in interpolated data.
+ if (current && !pressure) {
+ missing_pr = 1;
+ dense = 0;
+ continue;
+ }
+
// If we already have a pressure tracking entry, and
// it has not had any missing samples, just continue
// using it - there's nothing to interpolate yet.