mirror of
https://github.com/neovim/neovim.git
synced 2024-12-20 03:05:11 -07:00
Add null pointer assertions for do_unlet_var.
This commit is contained in:
parent
2e630d2611
commit
1bbe6d0a30
@ -2900,6 +2900,7 @@ static int do_unlet_var(lval_T *const lp, char_u *const name_end, int forceit)
|
||||
lp->ll_name_len))) {
|
||||
return FAIL;
|
||||
} else if (lp->ll_range) {
|
||||
assert(lp->ll_list != NULL);
|
||||
// Delete a range of List items.
|
||||
listitem_T *const first_li = lp->ll_li;
|
||||
listitem_T *last_li = first_li;
|
||||
@ -2926,6 +2927,7 @@ static int do_unlet_var(lval_T *const lp, char_u *const name_end, int forceit)
|
||||
} else {
|
||||
// unlet a Dictionary item.
|
||||
dict_T *d = lp->ll_dict;
|
||||
assert(d != NULL);
|
||||
dictitem_T *di = lp->ll_di;
|
||||
bool watched = tv_dict_is_watched(d);
|
||||
char *key = NULL;
|
||||
|
Loading…
Reference in New Issue
Block a user