summaryrefslogtreecommitdiff
path: root/pango/pangowin32.c
diff options
context:
space:
mode:
authorMatthias Clasen <mclasen@redhat.com>2021-04-05 16:20:51 +0000
committerMatthias Clasen <mclasen@redhat.com>2021-04-05 16:20:51 +0000
commitacea99b46dd4f6b92229089633b0a5d54498d984 (patch)
tree31d1306af8e2b00aaf5a4359c84abeb203c1c196 /pango/pangowin32.c
parent4d72358ff95b5930be60d7352dc742f16b95c58e (diff)
parent32b85b8f345991533e716ec0f7b278849f5ed4e7 (diff)
downloadpango-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.c5
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);