[PATCH] riched20: Check font_cache not safe for release_font_cache.
Huw Davies
huw at codeweavers.com
Thu Sep 24 07:36:41 CDT 2020
On Tue, Sep 22, 2020 at 09:45:36AM +0800, Chao Long wrote:
> From 7aed24cd859f9a2ee4950e25ec42e86f1c016d4e Mon Sep 17 00:00:00 2001
> From: Chao Long <longchao at uniontech.com>
> 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 <longchao at uniontech.com>
> ---
> 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;
This shouldn't be possible. Please file a bug if this condition
actually triggers.
Huw.
More information about the wine-devel
mailing list