aboutsummaryrefslogtreecommitdiff
path: root/src/os/job.c
diff options
context:
space:
mode:
authorThiago de Arruda <tpadilha84@gmail.com>2014-05-07 17:59:57 -0300
committerThiago de Arruda <tpadilha84@gmail.com>2014-05-12 19:28:30 -0300
commitf9c06e47c4c672fb5f07968dd2d536fa41c1f007 (patch)
tree5159e70c844b2679bbbe221101e3160971f9d525 /src/os/job.c
parentb3268d071277c8967b3e3ecb60430718e1f36472 (diff)
downloadrneovim-f9c06e47c4c672fb5f07968dd2d536fa41c1f007.tar.gz
rneovim-f9c06e47c4c672fb5f07968dd2d536fa41c1f007.tar.bz2
rneovim-f9c06e47c4c672fb5f07968dd2d536fa41c1f007.zip
Add channel module
- Add channel module that exposes the API over arbitrary streams - Add `xmemdup` for duplicating memory chunks - Make job exit callback optional
Diffstat (limited to 'src/os/job.c')
-rw-r--r--src/os/job.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/src/os/job.c b/src/os/job.c
index f0c64a27a8..7940338b70 100644
--- a/src/os/job.c
+++ b/src/os/job.c
@@ -250,8 +250,10 @@ void job_exit_event(Event event)
// this one
table[job->id - 1] = NULL;
- // Invoke the exit callback
- job->exit_cb(job, job->data);
+ if (job->exit_cb) {
+ // Invoke the exit callback
+ job->exit_cb(job, job->data);
+ }
// Free the job resources
free_job(job);