changeset 11947:8b9a1be7bb82 v8.0.0853

patch 8.0.0853: crash when running terminal with unknown command commit https://github.com/vim/vim/commit/b4a6721a288438c96fbeb051b09ef90735ac70d6 Author: Bram Moolenaar <Bram@vim.org> Date: Thu Aug 3 19:22:36 2017 +0200 patch 8.0.0853: crash when running terminal with unknown command Problem: Crash when running terminal with unknown command. Solution: Check "term" not to be NULL. (Yasuhiro Matsumoto, closes https://github.com/vim/vim/issues/1932)
author Christian Brabandt <cb@256bit.org>
date Thu, 03 Aug 2017 19:30:05 +0200
parents 2e9cf6f47b11
children 22b9a1d98097
files src/terminal.c src/version.c
diffstat 2 files changed, 4 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- 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);
 }
--- 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,