diff options
Diffstat (limited to 'src/autocmd.c')
-rw-r--r-- | src/autocmd.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/autocmd.c b/src/autocmd.c index 71aeb5036b..841da14622 100644 --- a/src/autocmd.c +++ b/src/autocmd.c @@ -3062,6 +3062,8 @@ f_autocmd_get(typval_T *argvars, typval_T *rettv) char_u *name = NULL; int group = AUGROUP_ALL; + if (rettv_list_alloc(rettv) == FAIL) + return; if (check_for_opt_dict_arg(argvars, 0) == FAIL) return; @@ -3128,8 +3130,6 @@ f_autocmd_get(typval_T *argvars, typval_T *rettv) } } - if (rettv_list_alloc(rettv) == FAIL) - return; event_list = rettv->vval.v_list; // iterate through all the autocmd events |