summaryrefslogtreecommitdiffstats
path: root/dive.c
diff options
context:
space:
mode:
Diffstat (limited to 'dive.c')
-rw-r--r--dive.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/dive.c b/dive.c
index 37f99048f..02c1090d9 100644
--- a/dive.c
+++ b/dive.c
@@ -1055,10 +1055,10 @@ static struct event *find_previous_event(struct divecomputer *dc, struct event *
struct event *ev = dc->events;
struct event *previous = NULL;
- if (!event->name)
+ if (same_string(event->name, ""))
return NULL;
while (ev && ev != event) {
- if (ev->name && !strcmp(ev->name, event->name))
+ if (same_string(ev->name, event->name))
previous = ev;
ev = ev->next;
}