summaryrefslogtreecommitdiffstats
path: root/divesite.c
diff options
context:
space:
mode:
authorGravatar Dirk Hohndel <dirk@hohndel.org>2015-02-12 12:27:55 -0800
committerGravatar Dirk Hohndel <dirk@hohndel.org>2015-02-12 12:29:35 -0800
commita6336d13b302d071bc94cc15b4a865f0ba2492f7 (patch)
tree56a1a58ed8b14e7a32c2148b99d15022ea0e9527 /divesite.c
parent0e6345f65b041b5005c75b83792ca98d8ef4f766 (diff)
downloadsubsurface-a6336d13b302d071bc94cc15b4a865f0ba2492f7.tar.gz
Don't ever create a dive site without valid uuid
If you want a specific one, you can always overwrite it, but a dive site with a uuid of 0 breaks some of our assumptions. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
Diffstat (limited to 'divesite.c')
-rw-r--r--divesite.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/divesite.c b/divesite.c
index c3bb45950..c9dbb095a 100644
--- a/divesite.c
+++ b/divesite.c
@@ -33,6 +33,7 @@ struct dive_site *alloc_dive_site()
exit(1);
sites[nr] = ds;
dive_site_table.nr = nr + 1;
+ ds->uuid = dive_site_getUniqId();
return ds;
}
@@ -40,7 +41,6 @@ struct dive_site *alloc_dive_site()
uint32_t create_dive_site(const char *name)
{
struct dive_site *ds = alloc_dive_site();
- ds->uuid = dive_site_getUniqId();
ds->name = copy_string(name);
return ds->uuid;