diff options
author | Matthias Clasen <mclasen@redhat.com> | 2021-04-05 16:20:51 +0000 |
---|---|---|
committer | Matthias Clasen <mclasen@redhat.com> | 2021-04-05 16:20:51 +0000 |
commit | acea99b46dd4f6b92229089633b0a5d54498d984 (patch) | |
tree | 31d1306af8e2b00aaf5a4359c84abeb203c1c196 /pango/pangowin32.c | |
parent | 4d72358ff95b5930be60d7352dc742f16b95c58e (diff) | |
parent | 32b85b8f345991533e716ec0f7b278849f5ed4e7 (diff) | |
download | pango-acea99b46dd4f6b92229089633b0a5d54498d984.tar.gz |
Merge branch 'win32-leak' into 'master'
pangowin32: Don't leak various member variables of PangoWin32Font object
See merge request GNOME/pango!317
Diffstat (limited to 'pango/pangowin32.c')
-rw-r--r-- | pango/pangowin32.c | 5 |
1 files changed, 1 insertions, 4 deletions
diff --git a/pango/pangowin32.c b/pango/pangowin32.c index 0a90182f..12b4a36e 100644 --- a/pango/pangowin32.c +++ b/pango/pangowin32.c @@ -820,10 +820,7 @@ pango_win32_font_finalize (GObject *object) PangoWin32FontCache *cache = pango_win32_font_map_get_font_cache (win32font->fontmap); PangoWin32Font *fontmap; - if (G_UNLIKELY (!cache)) - return; - - if (win32font->hfont != NULL) + if (cache != NULL && win32font->hfont != NULL) pango_win32_font_cache_unload (cache, win32font->hfont); g_slist_foreach (win32font->metrics_by_lang, (GFunc)free_metrics_info, NULL); |