mirror of
https://github.com/neovim/neovim.git
synced 2024-12-20 03:05:11 -07:00
Add assertion in set_var_lval for null pointer.
If the lval is a index into a list, li should not be null.
This commit is contained in:
parent
9ad557fb2d
commit
d63c3d9d10
@ -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);
|
||||
|
Loading…
Reference in New Issue
Block a user