0
0
mirror of https://github.com/vim/vim.git synced 2025-09-23 03:43:49 -04:00

patch 8.2.4041: using unitialized pointer

Problem:    Using unitialized pointer.
Solution:   Store "ht" when variable is in another script.
This commit is contained in:
Bram Moolenaar
2022-01-08 15:44:22 +00:00
parent 9f1a39a5d1
commit aa9b3cacd5
2 changed files with 6 additions and 0 deletions

View File

@@ -2898,7 +2898,11 @@ find_var_also_in_script(char_u *name, hashtab_T **htp, int no_autoload)
dictitem_T *di = find_var_in_ht(ht, 0, p + 1, no_autoload);
if (di != NULL)
{
if (htp != NULL)
*htp = ht;
return di;
}
}
}
}