mirror of
https://github.com/vim/vim.git
synced 2025-09-24 03:44:06 -04:00
patch 8.2.2113: MS-Windows GUI: crash after using ":set guifont=" four times
Problem: MS-Windows GUI: crash after using ":set guifont=" four times. Solution: Check for NULL pointer. (Ken Takata, closes #7434)
This commit is contained in:
@@ -239,7 +239,8 @@ public:
|
|||||||
if (mItems[n].pTextFormat != item.pTextFormat)
|
if (mItems[n].pTextFormat != item.pTextFormat)
|
||||||
{
|
{
|
||||||
SafeRelease(&mItems[n].pTextFormat);
|
SafeRelease(&mItems[n].pTextFormat);
|
||||||
item.pTextFormat->AddRef();
|
if (item.pTextFormat != NULL)
|
||||||
|
item.pTextFormat->AddRef();
|
||||||
}
|
}
|
||||||
mItems[n] = item;
|
mItems[n] = item;
|
||||||
slide(n);
|
slide(n);
|
||||||
|
@@ -386,6 +386,13 @@ func Test_set_guifont()
|
|||||||
if has('win32')
|
if has('win32')
|
||||||
" Invalid font names are accepted in GTK GUI
|
" Invalid font names are accepted in GTK GUI
|
||||||
call assert_fails('set guifont=xa1bc23d7f', 'E596:')
|
call assert_fails('set guifont=xa1bc23d7f', 'E596:')
|
||||||
|
|
||||||
|
" doing this four times used to cause a crash
|
||||||
|
set guifont=
|
||||||
|
set guifont=
|
||||||
|
set guifont=
|
||||||
|
set guifont=
|
||||||
|
set guifont=
|
||||||
endif
|
endif
|
||||||
|
|
||||||
if has('xfontset')
|
if has('xfontset')
|
||||||
|
@@ -750,6 +750,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 */
|
||||||
|
/**/
|
||||||
|
2113,
|
||||||
/**/
|
/**/
|
||||||
2112,
|
2112,
|
||||||
/**/
|
/**/
|
||||||
|
Reference in New Issue
Block a user