From f70415d7dbace56d3f69afbe835802a96d837b3e Mon Sep 17 00:00:00 2001 From: o9000 Date: Tue, 20 Jan 2015 23:37:40 +0000 Subject: [PATCH] taskbar: fix GLib-CRITICAL: g_hash_table_foreach: assertion version == hash_table->version failed git-svn-id: http://tint2.googlecode.com/svn/trunk@656 121b4492-b84c-0410-8b4c-0d4edfb3f3cc --- src/taskbar/taskbar.c | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/src/taskbar/taskbar.c b/src/taskbar/taskbar.c index 7ce2975..6b1e22e 100644 --- a/src/taskbar/taskbar.c +++ b/src/taskbar/taskbar.c @@ -64,7 +64,17 @@ void cleanup_taskbar() int i, j, k; cleanup_taskbarname(); - if (win_to_task_table) g_hash_table_foreach(win_to_task_table, taskbar_remove_task, 0); + if (win_to_task_table) { + while (g_hash_table_size(win_to_task_table)) { + GHashTableIter iter; + gpointer key, value; + + g_hash_table_iter_init (&iter, win_to_task_table); + if (g_hash_table_iter_next (&iter, &key, &value)) { + taskbar_remove_task(key, 0, 0); + } + } + } for (i=0 ; i < nb_panel ; i++) { panel = &panel1[i]; for (j=0 ; j < panel->nb_desktop ; j++) {