Check for existence of key in context dict before using it

fixes #1251
This commit is contained in:
Christian Brabandt 2016-09-09 08:06:32 +02:00
parent c058922358
commit 65b9aa4856
1 changed files with 1 additions and 1 deletions

View File

@ -47,7 +47,7 @@ function! s:prototype.build()
let contents = section[1]
let pgroup = prev_group
let prev_group = s:get_prev_group(self._sections, i)
if group ==# 'airline_c' && !self._context.active
if group ==# 'airline_c' && !self._context.active && has_key(self._context, 'bufnr')
let group = 'airline_c'. self._context.bufnr
endif
if is_empty