diff options
| -rw-r--r-- | src/terminal.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/src/terminal.c b/src/terminal.c index e8316ba32e8..5c21341d905 100644 --- a/src/terminal.c +++ b/src/terminal.c | |||
| @@ -22,6 +22,7 @@ along with GNU Emacs. If not, see <https://www.gnu.org/licenses/>. */ | |||
| 22 | #include "character.h" | 22 | #include "character.h" |
| 23 | #include "frame.h" | 23 | #include "frame.h" |
| 24 | #include "termchar.h" | 24 | #include "termchar.h" |
| 25 | #include "blockinput.h" | ||
| 25 | #include "termhooks.h" | 26 | #include "termhooks.h" |
| 26 | #include "keyboard.h" | 27 | #include "keyboard.h" |
| 27 | 28 | ||
| @@ -316,6 +317,9 @@ delete_terminal (struct terminal *terminal) | |||
| 316 | delete_terminal_hook when we delete our last frame. */ | 317 | delete_terminal_hook when we delete our last frame. */ |
| 317 | if (!terminal->name) | 318 | if (!terminal->name) |
| 318 | return; | 319 | return; |
| 320 | |||
| 321 | /* Protection while we are in inconsistent state. */ | ||
| 322 | block_input (); | ||
| 319 | xfree (terminal->name); | 323 | xfree (terminal->name); |
| 320 | terminal->name = NULL; | 324 | terminal->name = NULL; |
| 321 | 325 | ||
| @@ -331,6 +335,7 @@ delete_terminal (struct terminal *terminal) | |||
| 331 | } | 335 | } |
| 332 | 336 | ||
| 333 | delete_terminal_internal (terminal); | 337 | delete_terminal_internal (terminal); |
| 338 | unblock_input (); | ||
| 334 | } | 339 | } |
| 335 | 340 | ||
| 336 | void | 341 | void |