diff options
author | Tomaz Canabrava <tomaz.canabrava@intel.com> | 2015-06-26 15:03:34 -0300 |
---|---|---|
committer | Dirk Hohndel <dirk@hohndel.org> | 2015-06-26 18:50:22 -0700 |
commit | 05c5bf0919d57102d5509b58cce0b9e6c527aa6c (patch) | |
tree | fbdf79ca7b6f2ad81a15452f2855ce0dec3b13f0 /divesite.c | |
parent | 2fec1a88de2a075fd9586f5fb5c57b5bab2a74a6 (diff) | |
download | subsurface-05c5bf0919d57102d5509b58cce0b9e6c527aa6c.tar.gz |
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>
Diffstat (limited to 'divesite.c')
-rw-r--r-- | divesite.c | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/divesite.c b/divesite.c index 0abd664c0..113f117ff 100644 --- a/divesite.c +++ b/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; +} |