summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--planner.c9
1 files changed, 4 insertions, 5 deletions
diff --git a/planner.c b/planner.c
index d12f660f5..b6f0c4c5e 100644
--- a/planner.c
+++ b/planner.c
@@ -307,11 +307,10 @@ static void create_dive_from_plan(struct diveplan *diveplan, bool track_gas)
/* Check for SetPoint change */
if (oldpo2 != po2) {
- if (lasttime)
- /* this is a bad idea - we should get a different SAMPLE_EVENT type
- * reserved for this in libdivecomputer... overloading SMAPLE_EVENT_PO2
- * with a different meaning will only cause confusion elsewhere in the code */
- add_event(dc, lasttime, SAMPLE_EVENT_PO2, 0, po2, "SP change");
+ /* this is a bad idea - we should get a different SAMPLE_EVENT type
+ * reserved for this in libdivecomputer... overloading SMAPLE_EVENT_PO2
+ * with a different meaning will only cause confusion elsewhere in the code */
+ add_event(dc, lasttime, SAMPLE_EVENT_PO2, 0, po2, "SP change");
oldpo2 = po2;
}