diff options
-rw-r--r-- | core/divesite.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/core/divesite.c b/core/divesite.c index e3fb05966..04f6520b8 100644 --- a/core/divesite.c +++ b/core/divesite.c @@ -240,7 +240,8 @@ uint32_t create_dive_site_with_gps(const char *name, degrees_t latitude, degrees /* a uuid is always present - but if all the other fields are empty, the dive site is pointless */ bool dive_site_is_empty(struct dive_site *ds) { - return empty_string(ds->name) && + return !ds || + empty_string(ds->name) && empty_string(ds->description) && empty_string(ds->notes) && ds->latitude.udeg == 0 && |