0
0
mirror of https://github.com/vim/vim.git synced 2025-09-25 03:54:15 -04:00

patch 8.2.2504: Vim9: crash when using an argument from a closure

Problem:    Vim9: crash when using an argument from a closure.
Solution:   Check if gen_load_outer is NULL. (closes #7821)
This commit is contained in:
Bram Moolenaar
2021-02-12 21:50:57 +01:00
parent d9d7789b6f
commit 44ec21c467
3 changed files with 16 additions and 1 deletions

View File

@@ -261,7 +261,8 @@ arg_exists(
if (arg_exists(name, len, idxp, type, gen_load_outer, cctx->ctx_outer)
== OK)
{
++*gen_load_outer;
if (gen_load_outer != NULL)
++*gen_load_outer;
return OK;
}
}