summaryrefslogtreecommitdiffstats
path: root/dive.c
diff options
context:
space:
mode:
Diffstat (limited to 'dive.c')
-rw-r--r--dive.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/dive.c b/dive.c
index 680ceeb58..c464e7e33 100644
--- a/dive.c
+++ b/dive.c
@@ -888,8 +888,10 @@ void update_setpoint_events(struct divecomputer *dc)
}
ev = get_next_event(ev->next, "SP change");
}
- if (!changed)
- add_event(dc, 0, SAMPLE_EVENT_PO2, 0, new_setpoint, "SP change");
+ if (!changed) {
+ if (!add_event(dc, 0, SAMPLE_EVENT_PO2, 0, new_setpoint, "SP change"))
+ printf("Could not add setpoint change event\n");
+ }
}
void sanitize_gasmix(struct gasmix *mix)