mirror of
https://github.com/vim/vim.git
synced 2025-09-24 03:44:06 -04:00
patch 8.2.2848: crash whn calling partial
Problem: Crash whn calling partial. Solution: Check for NULL pointer. (Dominique Pellé, closes #8202)
This commit is contained in:
committed by
Bram Moolenaar
parent
588cf7547b
commit
fe8ebdbe5c
11
src/eval.c
11
src/eval.c
@@ -4284,10 +4284,13 @@ eval_index_inner(
|
||||
char_u *
|
||||
partial_name(partial_T *pt)
|
||||
{
|
||||
if (pt->pt_name != NULL)
|
||||
return pt->pt_name;
|
||||
if (pt->pt_func != NULL)
|
||||
return pt->pt_func->uf_name;
|
||||
if (pt != NULL)
|
||||
{
|
||||
if (pt->pt_name != NULL)
|
||||
return pt->pt_name;
|
||||
if (pt->pt_func != NULL)
|
||||
return pt->pt_func->uf_name;
|
||||
}
|
||||
return (char_u *)"";
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user