summaryrefslogtreecommitdiff
path: root/src/gui_dwrite.cpp
diff options
context:
space:
mode:
authorBram Moolenaar <Bram@vim.org>2020-12-08 21:12:40 +0100
committerBram Moolenaar <Bram@vim.org>2020-12-08 21:12:40 +0100
commit1b3e0727ce86ca4cfa47f8b5421d82ed47a9bec1 (patch)
tree13be53f6af0250dc0defbc469eb77a75ec61eefc /src/gui_dwrite.cpp
parentac665c24c97582a64ae2d151a812eca92c1ff2d6 (diff)
downloadvim-git-1b3e0727ce86ca4cfa47f8b5421d82ed47a9bec1.tar.gz
patch 8.2.2113: MS-Windows GUI: crash after using ":set guifont=" four timesv8.2.2113
Problem: MS-Windows GUI: crash after using ":set guifont=" four times. Solution: Check for NULL pointer. (Ken Takata, closes #7434)
Diffstat (limited to 'src/gui_dwrite.cpp')
-rw-r--r--src/gui_dwrite.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/gui_dwrite.cpp b/src/gui_dwrite.cpp
index 8767dc1af..83acdab1a 100644
--- a/src/gui_dwrite.cpp
+++ b/src/gui_dwrite.cpp
@@ -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);