From d63c3d9d105b7d81ad397e784b33d3dec7073338 Mon Sep 17 00:00:00 2001 From: Paul Rigge Date: Sat, 30 Dec 2017 20:53:01 -0800 Subject: [PATCH] Add assertion in set_var_lval for null pointer. If the lval is a index into a list, li should not be null. --- src/nvim/eval.c | 1 + 1 file changed, 1 insertion(+) diff --git a/src/nvim/eval.c b/src/nvim/eval.c index 33f8ffb738..f30840041b 100644 --- a/src/nvim/eval.c +++ b/src/nvim/eval.c @@ -2417,6 +2417,7 @@ static void set_var_lval(lval_T *lp, char_u *endp, typval_T *rettv, if (ri == NULL || (!lp->ll_empty2 && lp->ll_n2 == lp->ll_n1)) { break; } + assert(lp->ll_li != NULL); if (TV_LIST_ITEM_NEXT(lp->ll_list, lp->ll_li) == NULL) { // Need to add an empty item. tv_list_append_number(lp->ll_list, 0);