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:
parent
513cade0ff
commit
2e42b2d4df
@ -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);
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user