diff options
author | Sven Neumann <sven@gimp.org> | 2002-03-25 20:11:27 +0000 |
---|---|---|
committer | Sven Neumann <neo@src.gnome.org> | 2002-03-25 20:11:27 +0000 |
commit | 94168cf8452d787a171c69ad5a25b97f7ca0530f (patch) | |
tree | 2648c408e1dfa494bd52c5ed27a85c2c435f9287 /gtk/gtkrc.c | |
parent | cef7907ddd4a5254d564f9686a395d574630ddf1 (diff) | |
download | gtk+-94168cf8452d787a171c69ad5a25b97f7ca0530f.tar.gz |
free the style's font_description before accessing a new one.
2002-03-25 Sven Neumann <sven@gimp.org>
* gtk/gtkrc.c (gtk_rc_parse_font_name): free the style's
font_description before accessing a new one.
(gtk_rc_parse_stock): always unref the created icon_set. #76289
Diffstat (limited to 'gtk/gtkrc.c')
-rw-r--r-- | gtk/gtkrc.c | 17 |
1 files changed, 11 insertions, 6 deletions
diff --git a/gtk/gtkrc.c b/gtk/gtkrc.c index 7f400b765d..8c479b496f 100644 --- a/gtk/gtkrc.c +++ b/gtk/gtkrc.c @@ -2998,7 +2998,11 @@ gtk_rc_parse_font_name (GScanner *scanner, if (token != G_TOKEN_STRING) return G_TOKEN_STRING; - rc_style->font_desc = pango_font_description_from_string (scanner->value.v_string); + if (rc_style->font_desc) + pango_font_description_free (rc_style->font_desc); + + rc_style->font_desc = + pango_font_description_from_string (scanner->value.v_string); return G_TOKEN_NONE; } @@ -3752,12 +3756,13 @@ gtk_rc_parse_stock (GtkRcContext *context, } } - if (icon_set && icon_set_valid) + if (icon_set) { - gtk_icon_factory_add (factory, - stock_id, - icon_set); - + if (icon_set_valid) + gtk_icon_factory_add (factory, + stock_id, + icon_set); + gtk_icon_set_unref (icon_set); } |