]> granicus.if.org Git - vim/commitdiff
patch 8.0.0853: crash when running terminal with unknown command v8.0.0853
authorBram Moolenaar <Bram@vim.org>
Thu, 3 Aug 2017 17:22:36 +0000 (19:22 +0200)
committerBram Moolenaar <Bram@vim.org>
Thu, 3 Aug 2017 17:22:36 +0000 (19:22 +0200)
Problem:    Crash when running terminal with unknown command.
Solution:   Check "term" not to be NULL. (Yasuhiro Matsumoto, closes #1932)

src/terminal.c
src/version.c

index abdb50b30dfafecd03a681d6e45c0a308c522fd0..b06feffc2fbba5bb8988a67dc095249fc3d9918f 100644 (file)
@@ -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);
 }
index a029dd51c48b2883df326687319f95759a0b08ba..617042584b15d3130f390f15450d2cb2b1b1d48b 100644 (file)
@@ -769,6 +769,8 @@ static char *(features[]) =
 
 static int included_patches[] =
 {   /* Add new patch number below this line */
+/**/
+    853,
 /**/
     852,
 /**/