riched20: Check font_cache in select_style() too.

Signed-off-by: Serge Gautherie <winehq-git_serge_180711@gautherie.fr>
Signed-off-by: Huw Davies <huw@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
This commit is contained in:
Serge Gautherie 2021-11-08 16:23:05 +01:00 committed by Alexandre Julliard
parent 4138ef14fa
commit 177f808aa8
1 changed files with 1 additions and 1 deletions

View 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;