summaryrefslogtreecommitdiff
path: root/pango/fonts.c
diff options
context:
space:
mode:
authorOwen Taylor <otaylor@redhat.com>2003-04-15 21:39:37 +0000
committerOwen Taylor <otaylor@src.gnome.org>2003-04-15 21:39:37 +0000
commitbf7d6c918a7f031de6c9dd5669bb57b7c30ba60b (patch)
treed2dd46eddb39bf095e6d9161c10d0b12bff0f280 /pango/fonts.c
parent7fe94b7117af209f2faf23a9b79a8b125631deab (diff)
downloadpango-bf7d6c918a7f031de6c9dd5669bb57b7c30ba60b.tar.gz
Switch around the code so that pango_font_description_set_family (desc,
Tue Apr 15 05:34:05 2003 Owen Taylor <otaylor@redhat.com> * pango/fonts.c (pango_font_description_set_family): Switch around the code so that pango_font_description_set_family (desc, pango_font_description_set_family (desc)) in the case where desc->static_family is TRUE. (#106964, Morten Welinder)
Diffstat (limited to 'pango/fonts.c')
-rw-r--r--pango/fonts.c10
1 files changed, 6 insertions, 4 deletions
diff --git a/pango/fonts.c b/pango/fonts.c
index 18323596..dd34d2ca 100644
--- a/pango/fonts.c
+++ b/pango/fonts.c
@@ -95,13 +95,12 @@ void
pango_font_description_set_family (PangoFontDescription *desc,
const char *family)
{
+ gchar *old_family = NULL;
+
g_return_if_fail (desc != NULL);
- if (desc->family_name == family)
- return;
-
if (desc->family_name && !desc->static_family)
- g_free (desc->family_name);
+ old_family = desc->family_name;
if (family)
{
@@ -114,6 +113,9 @@ pango_font_description_set_family (PangoFontDescription *desc,
desc->family_name = NULL;
desc->mask &= ~PANGO_FONT_MASK_FAMILY;
}
+
+ if (old_family)
+ g_free (desc->family_name);
}
/**