fix main window lib unload : still FIXME status though..
authorcompudj <compudj@04897980-b3bd-0310-b5e0-8ef037075253>
Mon, 5 Sep 2005 17:16:07 +0000 (17:16 +0000)
committercompudj <compudj@04897980-b3bd-0310-b5e0-8ef037075253>
Mon, 5 Sep 2005 17:16:07 +0000 (17:16 +0000)
git-svn-id: http://ltt.polymtl.ca/svn@1134 04897980-b3bd-0310-b5e0-8ef037075253

ltt/branches/poly/lttv/modules/gui/lttvwindow/lttvwindow/init_module.c

index c9f55de6a6e90a9b1195ad4bde846ebb810d8282..21a30eedaaa354dbef12304f8772a6255fc39638 100644 (file)
@@ -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);
   
 }
 
This page took 0.024317 seconds and 4 git commands to generate.