summaryrefslogtreecommitdiff
path: root/src/vim9script.c
diff options
context:
space:
mode:
authorLemonBoy <thatlemon@gmail.com>2022-04-24 21:55:00 +0100
committerBram Moolenaar <Bram@vim.org>2022-04-24 21:55:00 +0100
commitaf59e34f1bf214ec6f2d0304c1c5b11ecda25a83 (patch)
treedba5ffd079bf486f9a75085951877ad6321b8517 /src/vim9script.c
parentaac12daa61d9e84616771ec9242fd232f46786e6 (diff)
downloadvim-git-af59e34f1bf214ec6f2d0304c1c5b11ecda25a83.tar.gz
patch 8.2.4822: setting ufunc to NULL twicev8.2.4822
Problem: Setting ufunc to NULL twice. Solution: Set ufunc to NULL in find_exported(). (closes #19275)
Diffstat (limited to 'src/vim9script.c')
-rw-r--r--src/vim9script.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/vim9script.c b/src/vim9script.c
index bb5f0299d..b1bfe634c 100644
--- a/src/vim9script.c
+++ b/src/vim9script.c
@@ -710,6 +710,8 @@ find_exported(
svar_T *sv;
scriptitem_T *script = SCRIPT_ITEM(sid);
+ *ufunc = NULL;
+
if (script->sn_import_autoload && script->sn_state == SN_STATE_NOT_LOADED)
{
if (do_source(script->sn_name, FALSE, DOSO_NONE, NULL) == FAIL)
@@ -724,7 +726,6 @@ find_exported(
if (idx >= 0)
{
sv = ((svar_T *)script->sn_var_vals.ga_data) + idx;
- *ufunc = NULL;
if ((sv->sv_flags & SVFLAG_EXPORTED) == 0)
{
if (verbose)