[RICHED20] select_style(): Check font_cache too
authorSerge Gautherie <reactos-git_serge_171003@gautherie.fr>
Fri, 5 Nov 2021 17:24:21 +0000 (18:24 +0100)
committerThomas Faber <thomas.faber@reactos.org>
Sun, 21 Nov 2021 18:07:59 +0000 (13:07 -0500)
Already upstreamed as wine-6.21-347-g177f808.

CORE-17843

dll/win32/riched20/style.c

index 8b9c212..37c0509 100644 (file)
@@ -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;