Avoid a memory leak when resetting the font

This commit is contained in:
Pierre Pronchery 2015-04-11 12:38:31 +02:00
parent eb7056c043
commit 676fcab447

View File

@ -1081,6 +1081,8 @@ static void _reset_icons(Desktop * desktop, Config * config)
desktop->foreground = color;
}
/* icons font */
if(desktop->font != NULL)
pango_font_description_free(desktop->font);
if((p = config_get(config, "icons", "font")) != NULL)
desktop->font = pango_font_description_from_string(p);
else