patch 8.2.2848: crash whn calling partial
Problem: Crash whn calling partial.
Solution: Check for NULL pointer. (Dominique Pellé, closes #8202)
diff --git a/src/testdir/test_functions.vim b/src/testdir/test_functions.vim
index 936a2d0..f675697 100644
--- a/src/testdir/test_functions.vim
+++ b/src/testdir/test_functions.vim
@@ -2150,6 +2150,10 @@
eval mydict.len->call([], mydict)->assert_equal(4)
call assert_fails("call call('Mylen', [], 0)", 'E715:')
call assert_fails('call foo', 'E107:')
+
+ " This once caused a crash.
+ call call(test_null_function(), [])
+ call call(test_null_partial(), [])
endfunc
func Test_char2nr()
diff --git a/src/testdir/test_listdict.vim b/src/testdir/test_listdict.vim
index 1b0796d..601dd17 100644
--- a/src/testdir/test_listdict.vim
+++ b/src/testdir/test_listdict.vim
@@ -743,6 +743,7 @@
" should not crash
call assert_fails('echo reduce([1], test_null_function())', 'E1132:')
+ call assert_fails('echo reduce([1], test_null_partial())', 'E1132:')
endfunc
" splitting a string to a List using split()