summaryrefslogtreecommitdiff
path: root/src/terminal.c
diff options
context:
space:
mode:
authorBram Moolenaar <Bram@vim.org>2018-09-09 19:56:07 +0200
committerBram Moolenaar <Bram@vim.org>2018-09-09 19:56:07 +0200
commita5c48c2698291e59244a705af1b7dbc60e03b09c (patch)
tree18bef29f55b02060cba89160eaeae9793f1bd5b8 /src/terminal.c
parent02c972153d0f36fd1ae4e7069869f51dc11c6c7d (diff)
downloadvim-git-a5c48c2698291e59244a705af1b7dbc60e03b09c.tar.gz
patch 8.1.0358: crash when using term_dumpwrite() after the job finishedv8.1.0358
Problem: Crash when using term_dumpwrite() after the job finished. Solution: Check for a finished job and give an error message.
Diffstat (limited to 'src/terminal.c')
-rw-r--r--src/terminal.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/src/terminal.c b/src/terminal.c
index 8524560a4..0c7630c62 100644
--- a/src/terminal.c
+++ b/src/terminal.c
@@ -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)
{