Attempt to fix rare assertion violations in 'mark_terminals'

* src/terminal.c (delete_terminal): Block input while we modify
the frame list and 'terminal_list'.  (Bug#71289)
This commit is contained in:
Eli Zaretskii 2024-06-06 10:47:21 +03:00
parent 0467b756aa
commit 7fbafb9d95

View file

@ -22,6 +22,7 @@ along with GNU Emacs. If not, see <https://www.gnu.org/licenses/>. */
#include "character.h"
#include "frame.h"
#include "termchar.h"
#include "blockinput.h"
#include "termhooks.h"
#include "keyboard.h"
@ -316,6 +317,9 @@ delete_terminal (struct terminal *terminal)
delete_terminal_hook when we delete our last frame. */
if (!terminal->name)
return;
/* Protection while we are in inconsistent state. */
block_input ();
xfree (terminal->name);
terminal->name = NULL;
@ -331,6 +335,7 @@ delete_terminal (struct terminal *terminal)
}
delete_terminal_internal (terminal);
unblock_input ();
}
void