patch 8.2.4269: Coverity warns for using a NULL pointer
Problem: Coverity warns for using a NULL pointer.
Solution: Check for "name" to not be NULL.
diff --git a/src/userfunc.c b/src/userfunc.c
index 747e4d4..371cfd3 100644
--- a/src/userfunc.c
+++ b/src/userfunc.c
@@ -4232,7 +4232,8 @@
name = prefixed;
}
}
- else if (vim9script && vim_strchr(name, AUTOLOAD_CHAR) != NULL)
+ else if (vim9script && name != NULL
+ && vim_strchr(name, AUTOLOAD_CHAR) != NULL)
{
emsg(_(e_cannot_use_name_with_hash_in_vim9_script_use_export_instead));
goto ret_free;