mirror of
https://github.com/vim/vim.git
synced 2025-09-24 03:44:06 -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:
@@ -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)
|
||||
{
|
||||
|
Reference in New Issue
Block a user