summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorTimo Sirainen <cras@irssi.org>2000-08-11 19:57:58 +0000
committercras <cras@dbcabf3a-b0e7-0310-adc4-f8d773084564>2000-08-11 19:57:58 +0000
commit8eb324accc8d47aeb80a32654265d26f54e0d4e6 (patch)
tree2e5457e5b96eb8cf3082bf92532dd175fec52c38 /src
parentead41669db43c95640441929b9adb00793135992 (diff)
downloadirssi-8eb324accc8d47aeb80a32654265d26f54e0d4e6.zip
When destroying window, change to different window before destroying
window items so that if they print anything, it won't get lost. git-svn-id: http://svn.irssi.org/repos/irssi/trunk@584 dbcabf3a-b0e7-0310-adc4-f8d773084564
Diffstat (limited to 'src')
-rw-r--r--src/fe-common/core/windows.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/src/fe-common/core/windows.c b/src/fe-common/core/windows.c
index b08f0358..77b8b3e2 100644
--- a/src/fe-common/core/windows.c
+++ b/src/fe-common/core/windows.c
@@ -107,11 +107,16 @@ void window_destroy(WINDOW_REC *window)
if (window->destroying) return;
window->destroying = TRUE;
+ windows = g_slist_remove(windows, window);
+
+ if (active_win == window && windows != NULL) {
+ active_win = NULL; /* it's corrupted */
+ window_set_active(windows->data);
+ }
while (window->items != NULL)
window_remove_item(window, window->items->data);
- windows = g_slist_remove(windows, window);
signal_emit("window destroyed", 1, window);
g_slist_foreach(window->waiting_channels, (GFunc) g_free, NULL);
@@ -122,11 +127,6 @@ void window_destroy(WINDOW_REC *window)
g_free_not_null(window->name);
g_free(window);
- if (active_win == window && windows != NULL) {
- active_win = NULL; /* it's corrupted */
- window_set_active(windows->data);
- }
-
windows_pack(refnum);
}