forked from aniani/vim
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:
@@ -60,9 +60,12 @@ pum_compute_size(void)
|
|||||||
pum_extra_width = 0;
|
pum_extra_width = 0;
|
||||||
for (i = 0; i < pum_size; ++i)
|
for (i = 0; i < pum_size; ++i)
|
||||||
{
|
{
|
||||||
w = vim_strsize(pum_array[i].pum_text);
|
if (pum_array[i].pum_text != NULL)
|
||||||
if (pum_base_width < w)
|
{
|
||||||
pum_base_width = w;
|
w = vim_strsize(pum_array[i].pum_text);
|
||||||
|
if (pum_base_width < w)
|
||||||
|
pum_base_width = w;
|
||||||
|
}
|
||||||
if (pum_array[i].pum_kind != NULL)
|
if (pum_array[i].pum_kind != NULL)
|
||||||
{
|
{
|
||||||
w = vim_strsize(pum_array[i].pum_kind) + 1;
|
w = vim_strsize(pum_array[i].pum_kind) + 1;
|
||||||
|
@@ -746,6 +746,8 @@ static char *(features[]) =
|
|||||||
|
|
||||||
static int included_patches[] =
|
static int included_patches[] =
|
||||||
{ /* Add new patch number below this line */
|
{ /* Add new patch number below this line */
|
||||||
|
/**/
|
||||||
|
678,
|
||||||
/**/
|
/**/
|
||||||
677,
|
677,
|
||||||
/**/
|
/**/
|
||||||
|
Reference in New Issue
Block a user