forked from AuroraMiddleware/gtk
Plugged leaking PangoFontDescriptions in gtk_modifier_style_set_font().
This commit is contained in:
parent
9438107bff
commit
a530f88234
@ -221,7 +221,12 @@ gtk_modifier_style_set_font (GtkModifierStyle *style,
|
||||
if ((!old_font && !font_desc) ||
|
||||
(old_font && font_desc &&
|
||||
pango_font_description_equal (old_font, font_desc)))
|
||||
return;
|
||||
{
|
||||
if (old_font)
|
||||
pango_font_description_free (old_font);
|
||||
|
||||
return;
|
||||
}
|
||||
|
||||
if (font_desc)
|
||||
gtk_style_properties_set (priv->style, 0,
|
||||
@ -230,6 +235,9 @@ gtk_modifier_style_set_font (GtkModifierStyle *style,
|
||||
else
|
||||
gtk_style_properties_unset_property (priv->style, "font", 0);
|
||||
|
||||
if (old_font)
|
||||
pango_font_description_free (old_font);
|
||||
|
||||
g_signal_emit (style, signals[CHANGED], 0);
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user