aboutsummaryrefslogtreecommitdiffstats
path: root/divelist.c
diff options
context:
space:
mode:
authorGravatar Dirk Hohndel <dirk@hohndel.org>2015-08-25 13:55:51 -0700
committerGravatar Dirk Hohndel <dirk@hohndel.org>2015-08-25 13:55:51 -0700
commitab255e07ea6060d1a36a5195f6be9cccd3e0ffcc (patch)
tree9dab28cbd5a46a567374214b4503771d2780fe7d /divelist.c
parent0db80103caa7534db7eb9d169dc97d79ab259e4e (diff)
downloadsubsurface-ab255e07ea6060d1a36a5195f6be9cccd3e0ffcc.tar.gz
Clear the displayed dive and dive site when clearing dive data
Otherwise some artefacts of the last dive / dive site that where shown can remain visible even after the dive data was closed. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
Diffstat (limited to 'divelist.c')
-rw-r--r--divelist.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/divelist.c b/divelist.c
index 18ff99135..85a70f9fd 100644
--- a/divelist.c
+++ b/divelist.c
@@ -1106,6 +1106,9 @@ void clear_dive_file_data()
while (dive_site_table.nr)
delete_dive_site(get_dive_site(0)->uuid);
+ clear_dive(&displayed_dive);
+ clear_dive_site(&displayed_dive_site);
+
free((void *)existing_filename);
existing_filename = NULL;