mirror of
https://github.com/vim/vim.git
synced 2025-09-29 04:34:16 -04:00
patch 8.2.0678: rare crash for popup menu
Problem: Rare crash for popup menu. Solution: Check for NULL pointer. (Nobuhiro Takasaki, closes #6027)
This commit is contained in:
@@ -59,10 +59,13 @@ pum_compute_size(void)
|
||||
pum_kind_width = 0;
|
||||
pum_extra_width = 0;
|
||||
for (i = 0; i < pum_size; ++i)
|
||||
{
|
||||
if (pum_array[i].pum_text != NULL)
|
||||
{
|
||||
w = vim_strsize(pum_array[i].pum_text);
|
||||
if (pum_base_width < w)
|
||||
pum_base_width = w;
|
||||
}
|
||||
if (pum_array[i].pum_kind != NULL)
|
||||
{
|
||||
w = vim_strsize(pum_array[i].pum_kind) + 1;
|
||||
|
@@ -746,6 +746,8 @@ static char *(features[]) =
|
||||
|
||||
static int included_patches[] =
|
||||
{ /* Add new patch number below this line */
|
||||
/**/
|
||||
678,
|
||||
/**/
|
||||
677,
|
||||
/**/
|
||||
|
Reference in New Issue
Block a user