diff options
author | Bram Moolenaar <Bram@vim.org> | 2021-12-14 08:41:38 +0000 |
---|---|---|
committer | Bram Moolenaar <Bram@vim.org> | 2021-12-14 08:41:38 +0000 |
commit | 829c8e87e2d99b9d87c9c745e74750177c0298df (patch) | |
tree | 91aa6fed68d3bd930a9a70100b05a40d54888f36 /src | |
parent | 0407d270342d363c6297a7556cd904b4c434df54 (diff) | |
download | vim-git-829c8e87e2d99b9d87c9c745e74750177c0298df.tar.gz |
patch 8.2.3803: GUI: crash with 'writedelay' set using a terminal windowv8.2.3803
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)
Diffstat (limited to 'src')
-rw-r--r-- | src/terminal.c | 6 | ||||
-rw-r--r-- | src/version.c | 2 |
2 files changed, 5 insertions, 3 deletions
diff --git a/src/terminal.c b/src/terminal.c index f8dc219b4..7efe071eb 100644 --- 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; diff --git a/src/version.c b/src/version.c index 4181019c1..7af95778c 100644 --- a/src/version.c +++ b/src/version.c @@ -750,6 +750,8 @@ static char *(features[]) = static int included_patches[] = { /* Add new patch number below this line */ /**/ + 3803, +/**/ 3802, /**/ 3801, |