commit | 44ec21c467ddf481b422c787324ea08f375f6942 | [log] [tgz] |
---|---|---|
author | Bram Moolenaar <Bram@vim.org> | Fri Feb 12 21:50:57 2021 +0100 |
committer | Bram Moolenaar <Bram@vim.org> | Fri Feb 12 21:50:57 2021 +0100 |
tree | d9b948edd0083d64655119453b811fac1f85cc3f | |
parent | d9d7789b6fe5f2b4074375ee9f1c0bad3e4d3cfe [diff] [blame] |
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)
diff --git a/src/vim9compile.c b/src/vim9compile.c index 4dfb42f..b4b9c28 100644 --- a/src/vim9compile.c +++ b/src/vim9compile.c
@@ -261,7 +261,8 @@ 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; } }