diff options
-rw-r--r-- | src/job.c | 5 | ||||
-rw-r--r-- | src/testdir/test_channel.vim | 4 | ||||
-rw-r--r-- | src/version.c | 2 |
3 files changed, 10 insertions, 1 deletions
@@ -1983,7 +1983,10 @@ job_to_string_buf(typval_T *varp, char_u *buf) char *status; if (job == NULL) - return (char_u *)"no process"; + { + vim_snprintf((char *)buf, NUMBUFLEN, "no process"); + return buf; + } status = job->jv_status == JOB_FAILED ? "fail" : job->jv_status >= JOB_ENDED ? "dead" : "run"; diff --git a/src/testdir/test_channel.vim b/src/testdir/test_channel.vim index 783a41d2c3..fa510c7bbc 100644 --- a/src/testdir/test_channel.vim +++ b/src/testdir/test_channel.vim @@ -1718,6 +1718,10 @@ func Test_job_stop_immediately() endtry endfunc +func Test_null_job_eval() + call assert_fails('eval test_null_job()->eval()', 'E121:') +endfunc + " This was leaking memory. func Test_partial_in_channel_cycle() let d = {} diff --git a/src/version.c b/src/version.c index a3f0a8db20..c2e07c668f 100644 --- a/src/version.c +++ b/src/version.c @@ -756,6 +756,8 @@ static char *(features[]) = static int included_patches[] = { /* Add new patch number below this line */ /**/ + 3379, +/**/ 3378, /**/ 3377, |