Mercurial > vim
changeset 26548:15764dc9a59d v8.2.3803
patch 8.2.3803: GUI: crash with 'writedelay' set using a terminal window
Commit: https://github.com/vim/vim/commit/829c8e87e2d99b9d87c9c745e74750177c0298df
Author: Bram Moolenaar <Bram@vim.org>
Date: Tue Dec 14 08:41:38 2021 +0000
patch 8.2.3803: GUI: crash with 'writedelay' set using a terminal window
Problem: Crash when 'writedelay' is set and using a terminal window to
execute a shell command.
Solution: Check that "tl_vterm" isn't NULL. (closes #9346)
author | Bram Moolenaar <Bram@vim.org> |
---|---|
date | Tue, 14 Dec 2021 09:45:04 +0100 |
parents | e4dab977c8ad |
children | cd63d34b9916 |
files | src/terminal.c src/version.c |
diffstat | 2 files changed, 5 insertions(+), 3 deletions(-) [+] |
line wrap: on
line diff
--- a/src/terminal.c +++ b/src/terminal.c @@ -2101,15 +2101,15 @@ term_enter_job_mode() /* * Get a key from the user with terminal mode mappings. * Note: while waiting a terminal may be closed and freed if the channel is - * closed and ++close was used. + * closed and ++close was used. This may even happen before we get here. */ static int term_vgetc() { int c; int save_State = State; - int modify_other_keys = - vterm_is_modify_other_keys(curbuf->b_term->tl_vterm); + int modify_other_keys = curbuf->b_term->tl_vterm == NULL ? FALSE + : vterm_is_modify_other_keys(curbuf->b_term->tl_vterm); State = TERMINAL; got_int = FALSE;