Destroy the divelist (tree) before calling gtk_main_quit()

Added new function dive_list_destroy() in divelist.c

Signed-off-by: Lubomir I. Ivanov <neolit123@gmail.com>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
This commit is contained in:
Lubomir I. Ivanov 2012-10-02 01:52:43 +03:00 committed by Dirk Hohndel
parent 7f01b91c99
commit cfefa0206d
3 changed files with 8 additions and 0 deletions

View file

@ -356,6 +356,7 @@ static gboolean on_delete(GtkWidget* w, gpointer data)
static void on_destroy(GtkWidget* w, gpointer data)
{
dive_list_destroy();
gtk_main_quit();
}
@ -369,6 +370,7 @@ void quit(GtkWidget *w, gpointer data)
quit = ask_save_changes();
if (quit){
dive_list_destroy();
gtk_main_quit();
}
}