Problem: Crash when using NULL string for funcref().
Solution: Check for NULL argument. (issue #8260)
s = tv_get_string(&argvars[0]);
use_string = TRUE;
}
+ if (s == NULL)
+ {
+ semsg(_(e_invarg2), "NULL");
+ return;
+ }
if ((use_string && vim_strchr(s, AUTOLOAD_CHAR) == NULL) || is_funcref)
{
let OneByRef = funcref("One", repeat(["foo"], 20))
call assert_fails('let OneByRef = funcref("One", repeat(["foo"], 21))', 'E118:')
call assert_fails('echo function("min") =~ function("min")', 'E694:')
+ call assert_fails('echo test_null_function()->funcref()', 'E475: Invalid argument: NULL')
endfunc
func Test_setmatches()
static int included_patches[] =
{ /* Add new patch number below this line */
+/**/
+ 3380,
/**/
3379,
/**/