From cbf29653d7e9d92660295c7c5ffbbdbaba1886fb Mon Sep 17 00:00:00 2001 From: Dirk Hohndel Date: Sun, 27 Sep 2015 13:16:40 -0400 Subject: Don't crash when creating a dive site ID for a nameless site This can happen when parsing the GPS data from our web service. Signed-off-by: Dirk Hohndel --- divesite.c | 2 ++ 1 file changed, 2 insertions(+) (limited to 'divesite.c') diff --git a/divesite.c b/divesite.c index f668889f3..1e179820f 100644 --- a/divesite.c +++ b/divesite.c @@ -177,6 +177,8 @@ void delete_dive_site(uint32_t id) uint32_t create_divesite_uuid(const char *name, timestamp_t divetime) { + if (name == NULL) + name =""; unsigned char hash[20]; SHA_CTX ctx; SHA1_Init(&ctx); -- cgit v1.2.3-70-g09d2