0
0
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:
Bram Moolenaar
2020-12-08 21:12:40 +01:00
parent ac665c24c9
commit 1b3e0727ce
3 changed files with 11 additions and 1 deletions

View File

@@ -239,7 +239,8 @@ public:
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);