diff options
| author | 2015-09-27 13:16:40 -0400 | |
|---|---|---|
| committer | 2015-09-27 13:16:40 -0400 | |
| commit | cbf29653d7e9d92660295c7c5ffbbdbaba1886fb (patch) | |
| tree | aa57134c089b106b6ab9e04bdbb00ffaf1d34ae0 | |
| parent | fe9958380edba2025e1086dbf600064e420e3232 (diff) | |
| download | subsurface-cbf29653d7e9d92660295c7c5ffbbdbaba1886fb.tar.gz | |
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>
| -rw-r--r-- | divesite.c | 2 |
1 files changed, 2 insertions, 0 deletions
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); |