0
0
mirror of https://github.com/vim/vim.git synced 2025-09-26 04:04:07 -04:00

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)
This commit is contained in:
Bram Moolenaar
2021-12-14 08:41:38 +00:00
parent 0407d27034
commit 829c8e87e2
2 changed files with 5 additions and 3 deletions

View File

@@ -2101,15 +2101,15 @@ term_enter_job_mode()
/* /*
* Get a key from the user with terminal mode mappings. * Get a key from the user with terminal mode mappings.
* Note: while waiting a terminal may be closed and freed if the channel is * 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 static int
term_vgetc() term_vgetc()
{ {
int c; int c;
int save_State = State; int save_State = State;
int modify_other_keys = int modify_other_keys = curbuf->b_term->tl_vterm == NULL ? FALSE
vterm_is_modify_other_keys(curbuf->b_term->tl_vterm); : vterm_is_modify_other_keys(curbuf->b_term->tl_vterm);
State = TERMINAL; State = TERMINAL;
got_int = FALSE; got_int = FALSE;

View File

@@ -749,6 +749,8 @@ static char *(features[]) =
static int included_patches[] = static int included_patches[] =
{ /* Add new patch number below this line */ { /* Add new patch number below this line */
/**/
3803,
/**/ /**/
3802, 3802,
/**/ /**/