Avoid internal errors with setloclist()

All syntastic users experienced this problem:

  E685: Internal error: get_tv_string_buf()

It's reproducable with:

  :call setloclist(0, [''])

So, not given optional arguments to setloclist() lead to some fields not
inizilied and the code took the wrong branches.
This commit is contained in:
Marco Hinz
2016-02-26 18:43:32 +01:00
parent 23f8696317
commit b6170db1a1
2 changed files with 9 additions and 9 deletions

View File

@@ -15251,7 +15251,7 @@ static void set_qf_ll_list(win_T *wp, typval_T *list_arg, typval_T *action_arg,
action = *act;
}
if (title_arg->v_type != VAR_UNKNOWN) {
if (title_arg->v_type == VAR_STRING) {
title = get_tv_string_chk(title_arg);
if (!title) {
return; // type error; errmsg already given