mirror of
https://github.com/subsurface/subsurface.git
synced 2024-11-28 13:10:19 +00:00
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>
This commit is contained in:
parent
0e6345f65b
commit
a6336d13b3
1 changed files with 1 additions and 1 deletions
|
@ -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;
|
||||
|
|
Loading…
Reference in a new issue