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 <dirk@hohndel.org>
This commit is contained in:
parent
fe9958380e
commit
cbf29653d7
@ -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);
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user