mirror of
https://github.com/subsurface/subsurface.git
synced 2025-02-19 22:16:15 +00:00
Dive site rewrite: try to fix a crash
Signed-off-by: Tomaz Canabrava <tomaz.canabrava@intel.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
This commit is contained in:
parent
2fec1a88de
commit
05c5bf0919
5 changed files with 41 additions and 8 deletions
10
divesite.c
10
divesite.c
|
@ -169,3 +169,13 @@ void copy_dive_site(struct dive_site *orig, struct dive_site *copy)
|
|||
copy->notes = copy_string(orig->notes);
|
||||
copy->description = copy_string(orig->description);
|
||||
}
|
||||
|
||||
void clear_dive_site(struct dive_site *ds)
|
||||
{
|
||||
free(ds->name);
|
||||
free(ds->notes);
|
||||
free(ds->description);
|
||||
ds->latitude.udeg = 0;
|
||||
ds->longitude.udeg = 0;
|
||||
ds->uuid = 0;
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue