From: "Chao Long" Subject: [PATCH] riched20: Check font_cache not safe for release_font_cache. Message-Id: <202009220945361417810@uniontech.com> Date: Tue, 22 Sep 2020 09:45:36 +0800 From 7aed24cd859f9a2ee4950e25ec42e86f1c016d4e Mon Sep 17 00:00:00 2001 From: Chao Long Date: Tue, 22 Sep 2020 09:35:58 +0800 Subject: [PATCH] riched20: Check font_cache not safe for release_font_cache. Signed-off-by: Chao Long --- dlls/riched20/style.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/dlls/riched20/style.c b/dlls/riched20/style.c index 8b9c2126b1..37c0509621 100644 --- a/dlls/riched20/style.c +++ b/dlls/riched20/style.c @@ -429,7 +429,7 @@ void select_style( ME_Context *c, ME_Style *s ) c->orig_font = NULL; } - if (c->current_style) + if (c->current_style && c->current_style->font_cache) { release_font_cache( c->current_style->font_cache ); c->current_style->font_cache = NULL; -- 2.20.1