summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBram Moolenaar <Bram@vim.org>2017-08-03 19:22:36 +0200
committerBram Moolenaar <Bram@vim.org>2017-08-03 19:22:36 +0200
commitb4a6721a288438c96fbeb051b09ef90735ac70d6 (patch)
treeeb5a552daf6dbdcad0605c54caa041727927c360
parent1b66c00aeca87913e75012c59c4e969316e2626d (diff)
downloadvim-git-b4a6721a288438c96fbeb051b09ef90735ac70d6.tar.gz
patch 8.0.0853: crash when running terminal with unknown commandv8.0.0853
Problem: Crash when running terminal with unknown command. Solution: Check "term" not to be NULL. (Yasuhiro Matsumoto, closes #1932)
-rw-r--r--src/terminal.c3
-rw-r--r--src/version.c2
2 files changed, 4 insertions, 1 deletions
diff --git a/src/terminal.c b/src/terminal.c
index abdb50b30..b06feffc2 100644
--- a/src/terminal.c
+++ b/src/terminal.c
@@ -629,7 +629,8 @@ term_job_running(term_T *term)
{
/* Also consider the job finished when the channel is closed, to avoid a
* race condition when updating the title. */
- return term->tl_job != NULL
+ return term != NULL
+ && term->tl_job != NULL
&& term->tl_job->jv_status == JOB_STARTED
&& channel_is_open(term->tl_job->jv_channel);
}
diff --git a/src/version.c b/src/version.c
index a029dd51c..617042584 100644
--- a/src/version.c
+++ b/src/version.c
@@ -770,6 +770,8 @@ static char *(features[]) =
static int included_patches[] =
{ /* Add new patch number below this line */
/**/
+ 853,
+/**/
852,
/**/
851,