summaryrefslogtreecommitdiffstats
path: root/src/eval.c
diff options
context:
space:
mode:
authorBram Moolenaar <Bram@vim.org>2016-03-07 15:24:03 +0100
committerBram Moolenaar <Bram@vim.org>2016-03-07 15:24:03 +0100
commit4e329fcaf7122370a6d1815a30aaf29476d3f722 (patch)
treeff8e9b2cccbd291a8a1ea33821279dd4b863f359 /src/eval.c
parentb69fccf377f43544b86817b0de6cc1498a4ff9ec (diff)
patch 7.4.1507v7.4.1507
Problem: Crash when starting a job fails. Solution: Check for the channel to be NULL. (idea by Yasuhiro Matsumoto)
Diffstat (limited to 'src/eval.c')
-rw-r--r--src/eval.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/eval.c b/src/eval.c
index 77638d5612..f65c9a0b1b 100644
--- a/src/eval.c
+++ b/src/eval.c
@@ -15262,7 +15262,8 @@ f_job_start(typval_T *argvars UNUSED, typval_T *rettv)
#ifdef FEAT_CHANNEL
/* If the channel is reading from a buffer, write lines now. */
- channel_write_in(job->jv_channel);
+ if (job->jv_channel != NULL)
+ channel_write_in(job->jv_channel);
#endif
theend: