aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorPaul Rigge <rigge@berkeley.edu>2017-12-30 20:53:01 -0800
committerPaul Rigge <rigge@berkeley.edu>2018-01-02 17:22:33 -0800
commitd63c3d9d105b7d81ad397e784b33d3dec7073338 (patch)
tree451990c6b69d791f5f69adda80229736cb504ee7 /src
parent9ad557fb2d4a1ef3101c7894a1038aa2eb932a48 (diff)
downloadrneovim-d63c3d9d105b7d81ad397e784b33d3dec7073338.tar.gz
rneovim-d63c3d9d105b7d81ad397e784b33d3dec7073338.tar.bz2
rneovim-d63c3d9d105b7d81ad397e784b33d3dec7073338.zip
Add assertion in set_var_lval for null pointer.
If the lval is a index into a list, li should not be null.
Diffstat (limited to 'src')
-rw-r--r--src/nvim/eval.c1
1 files changed, 1 insertions, 0 deletions
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);