summaryrefslogtreecommitdiff
path: root/autoload
diff options
context:
space:
mode:
authorw0rp <devw0rp@gmail.com>2017-02-17 09:56:36 +0000
committerw0rp <devw0rp@gmail.com>2017-02-17 09:56:36 +0000
commitbdbf36991d2f21feb3be08cfa979c76e548577a1 (patch)
treed59a0454cba100da32dd99aa67b9fcce857a5341 /autoload
parent5041246c0e2bddc603be3c6497dc273dd0454d36 (diff)
downloadale-bdbf36991d2f21feb3be08cfa979c76e548577a1.zip
Prevent some stupid exceptions
Diffstat (limited to 'autoload')
-rw-r--r--autoload/ale/engine.vim6
1 files changed, 5 insertions, 1 deletions
diff --git a/autoload/ale/engine.vim b/autoload/ale/engine.vim
index ac8028a9..593876fb 100644
--- a/autoload/ale/engine.vim
+++ b/autoload/ale/engine.vim
@@ -18,7 +18,11 @@ function! s:GetJobID(job) abort
" In Vim 8, the job is a special variable, and we open a channel for each
" job. We'll use the ID of the channel instead as the job ID.
try
- return ch_info(job_getchannel(a:job)).id
+ let l:channel_info = ch_info(job_getchannel(a:job))
+
+ if !empty(l:channel_info)
+ return l:channel_info.id
+ endif
catch
endtry