1
0
mirror of https://github.com/rkd77/elinks.git synced 2025-02-02 15:09:23 -05:00

Fix assertion failure when closing a terminal that has more than one tab.

src/terminal/terminal.c (destroy_terminal): Set term->current_tab = 0
before deleting any windows.
This commit is contained in:
Kalle Olavi Niemitalo 2006-05-14 23:13:51 +03:00 committed by Kalle Olavi Niemitalo
parent 513cade0ff
commit 2e42b2d4df

View File

@ -116,6 +116,12 @@ destroy_terminal(struct terminal *term)
bookmark_auto_save_tabs(term);
#endif
/* delete_window doesn't update term->current_tab, but it
calls redraw_terminal, which requires term->current_tab
to be valid if there are any tabs left. So set a value
that will be valid for that long. */
term->current_tab = 0;
while (!list_empty(term->windows))
delete_window(term->windows.next);