Problem: MS-Windows GUI: crash after using ":set guifont=" four times.
Solution: Check for NULL pointer. (Ken Takata, closes #7434)
if (mItems[n].pTextFormat != item.pTextFormat)
{
SafeRelease(&mItems[n].pTextFormat);
- item.pTextFormat->AddRef();
+ if (item.pTextFormat != NULL)
+ item.pTextFormat->AddRef();
}
mItems[n] = item;
slide(n);
if has('win32')
" Invalid font names are accepted in GTK GUI
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
if has('xfontset')
static int included_patches[] =
{ /* Add new patch number below this line */
+/**/
+ 2113,
/**/
2112,
/**/