summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--dive.h2
1 files changed, 2 insertions, 0 deletions
diff --git a/dive.h b/dive.h
index 9a26892e6..8e54c3d73 100644
--- a/dive.h
+++ b/dive.h
@@ -624,6 +624,8 @@ static inline bool dive_site_has_gps_location(struct dive_site *ds)
static inline int dive_has_gps_location(struct dive *dive)
{
+ if (!dive)
+ return false;
return dive_site_has_gps_location(get_dive_site_by_uuid(dive->dive_site_uuid));
}