summaryrefslogtreecommitdiffstats
path: root/gaspressures.c
diff options
context:
space:
mode:
Diffstat (limited to 'gaspressures.c')
-rw-r--r--gaspressures.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/gaspressures.c b/gaspressures.c
index 4edcf7e35..5f46d6080 100644
--- a/gaspressures.c
+++ b/gaspressures.c
@@ -417,7 +417,8 @@ void populate_pressure_information(struct dive *dive, struct divecomputer *dc, s
/* transmitter stopped transmitting cylinder pressure data */
current = pr_track_alloc(pressure, entry->sec);
- track_pr[cylinderindex] = list_add(track_pr[cylinderindex], current);
+ if (cylinderindex >= 0)
+ track_pr[cylinderindex] = list_add(track_pr[cylinderindex], current);
}
if (missing_pr) {