diff options
author | Timo Sirainen <cras@irssi.org> | 2002-05-04 19:44:25 +0000 |
---|---|---|
committer | cras <cras@dbcabf3a-b0e7-0310-adc4-f8d773084564> | 2002-05-04 19:44:25 +0000 |
commit | 8a7bc3b66722597e31fae28b199bc46da164f3f3 (patch) | |
tree | 6e2f0976a7ed74f9d69a5173888403590f857891 | |
parent | 5d1e89fa77c71da7506ab8a791b23e99c0135840 (diff) | |
download | irssi-8a7bc3b66722597e31fae28b199bc46da164f3f3.zip |
don't leave active_win corrupted if last window is killed.
git-svn-id: http://svn.irssi.org/repos/irssi/trunk@2751 dbcabf3a-b0e7-0310-adc4-f8d773084564
-rw-r--r-- | src/fe-common/core/fe-windows.c | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/src/fe-common/core/fe-windows.c b/src/fe-common/core/fe-windows.c index 80d366e3..970bfaa3 100644 --- a/src/fe-common/core/fe-windows.c +++ b/src/fe-common/core/fe-windows.c @@ -109,9 +109,10 @@ void window_destroy(WINDOW_REC *window) 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); + if (active_win == window) { + active_win = NULL; /* it's corrupted */ + if (windows != NULL) + window_set_active(windows->data); } while (window->items != NULL) |