From d0724d16c130ef79c8402d7ea94c128771cbc519 Mon Sep 17 00:00:00 2001 From: compudj Date: Mon, 5 Sep 2005 17:16:07 +0000 Subject: [PATCH] fix main window lib unload : still FIXME status though.. git-svn-id: http://ltt.polymtl.ca/svn@1134 04897980-b3bd-0310-b5e0-8ef037075253 --- .../modules/gui/lttvwindow/lttvwindow/init_module.c | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/ltt/branches/poly/lttv/modules/gui/lttvwindow/lttvwindow/init_module.c b/ltt/branches/poly/lttv/modules/gui/lttvwindow/lttvwindow/init_module.c index c9f55de6..21a30eed 100644 --- a/ltt/branches/poly/lttv/modules/gui/lttvwindow/lttvwindow/init_module.c +++ b/ltt/branches/poly/lttv/modules/gui/lttvwindow/lttvwindow/init_module.c @@ -233,6 +233,10 @@ main_window_destructor(MainWindow * mw) gtk_widget_destroy(mw->mwindow); } +static void destroy_walk(gpointer data, gpointer user_data) +{ + main_window_destructor((MainWindow*)data); +} /** * plugin's destroy function @@ -252,12 +256,9 @@ static void destroy() { g_debug("GUI destroy()"); - if(g_main_window_list){ - for(iter=g_main_window_list;iter!=NULL;iter=g_slist_next(iter)) { - main_window_destructor((MainWindow*)iter->data); - } - g_slist_free(g_main_window_list); - } + g_slist_foreach(g_main_window_list, destroy_walk, NULL); + + g_slist_free(g_main_window_list); } -- 2.34.1