diff --git a/src/fe-common/core/windows.c b/src/fe-common/core/windows.c index 5b362af9..e08a6c1a 100644 --- a/src/fe-common/core/windows.c +++ b/src/fe-common/core/windows.c @@ -101,8 +101,6 @@ static void windows_pack(int removed_refnum) void window_destroy(WINDOW_REC *window) { - int refnum; - g_return_if_fail(window != NULL); if (window->destroying) return; @@ -117,17 +115,16 @@ void window_destroy(WINDOW_REC *window) while (window->items != NULL) window_remove_item(window, window->items->data); + windows_pack(window->refnum); + signal_emit("window destroyed", 1, window); g_slist_foreach(window->waiting_channels, (GFunc) g_free, NULL); g_slist_free(window->waiting_channels); - refnum = window->refnum; g_free_not_null(window->theme_name); g_free_not_null(window->name); g_free(window); - - windows_pack(refnum); } void window_set_active(WINDOW_REC *window) diff --git a/src/fe-text/statusbar-items.c b/src/fe-text/statusbar-items.c index b59ce59b..2b6abfdb 100644 --- a/src/fe-text/statusbar-items.c +++ b/src/fe-text/statusbar-items.c @@ -464,13 +464,11 @@ static void sig_statusbar_activity_hilight(WINDOW_REC *window, gpointer oldlevel static void sig_statusbar_activity_window_destroyed(WINDOW_REC *window) { - g_return_if_fail(window != NULL); + g_return_if_fail(window != NULL); - if (g_list_find(activity_list, window) != NULL) - { - activity_list = g_list_remove(activity_list, window); - statusbar_item_redraw(activity_item); - } + if (g_list_find(activity_list, window) != NULL) + activity_list = g_list_remove(activity_list, window); + statusbar_item_redraw(activity_item); } /* redraw -- more -- */