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

patch 8.1.0358: crash when using term_dumpwrite() after the job finished

Problem:    Crash when using term_dumpwrite() after the job finished.
Solution:   Check for a finished job and give an error message.
This commit is contained in:
Bram Moolenaar 2018-09-09 19:56:07 +02:00
parent 02c972153d
commit a5c48c2698
2 changed files with 7 additions and 0 deletions

View File

@ -3871,6 +3871,11 @@ f_term_dumpwrite(typval_T *argvars, typval_T *rettv UNUSED)
if (buf == NULL)
return;
term = buf->b_term;
if (term->tl_vterm == NULL)
{
EMSG(_("E958: Job already finished"));
return;
}
if (argvars[2].v_type != VAR_UNKNOWN)
{

View File

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