0
0
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:
Dominique Pelle
2021-05-13 14:55:55 +02:00
committed by Bram Moolenaar
parent 588cf7547b
commit fe8ebdbe5c
5 changed files with 18 additions and 8 deletions

View File

@@ -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 *)"";
}