summaryrefslogtreecommitdiffstats
path: root/save-git.c
diff options
context:
space:
mode:
Diffstat (limited to 'save-git.c')
-rw-r--r--save-git.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/save-git.c b/save-git.c
index 3fd8807c6..2757757b2 100644
--- a/save-git.c
+++ b/save-git.c
@@ -850,7 +850,7 @@ static void create_commit_message(struct membuffer *msg)
nr = dive->number;
put_format(msg, "dive %d: %s", nr, location);
- if (trip->location && *trip->location && strcmp(trip->location, location))
+ if (trip && trip->location && *trip->location && strcmp(trip->location, location))
put_format(msg, " (%s)", trip->location);
put_format(msg, "\n\n");
}