Serge Gautherie : riched20: Check font_cache in select_style() too.

Alexandre Julliard julliard at winehq.org
Wed Nov 17 16:27:59 CST 2021


Module: wine
Branch: master
Commit: 177f808aa86e5442be1a0a92ddccc4904bf2e743
URL:    https://source.winehq.org/git/wine.git/?a=commit;h=177f808aa86e5442be1a0a92ddccc4904bf2e743

Author: Serge Gautherie <winehq-git_serge_180711 at gautherie.fr>
Date:   Mon Nov  8 16:23:05 2021 +0100

riched20: Check font_cache in select_style() too.

Signed-off-by: Serge Gautherie <winehq-git_serge_180711 at gautherie.fr>
Signed-off-by: Huw Davies <huw at codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard at winehq.org>

---

 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 917a5bd8100..266bb934753 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;




More information about the wine-cvs mailing list