summaryrefslogtreecommitdiff
path: root/pango/itemize.c
diff options
context:
space:
mode:
Diffstat (limited to 'pango/itemize.c')
-rw-r--r--pango/itemize.c14
1 files changed, 10 insertions, 4 deletions
diff --git a/pango/itemize.c b/pango/itemize.c
index 01399b7e..728ad7d9 100644
--- a/pango/itemize.c
+++ b/pango/itemize.c
@@ -1164,6 +1164,9 @@ apply_scale_to_item (PangoContext *context,
PangoFontDescription *desc;
double size;
+ if (!item->analysis.font)
+ return;
+
if (is_small_caps)
pango_analysis_set_size_font (&item->analysis, item->analysis.font);
@@ -1294,11 +1297,14 @@ static PangoVariant
get_font_variant (PangoItem *item)
{
PangoFontDescription *desc;
- PangoVariant variant;
+ PangoVariant variant = PANGO_VARIANT_NORMAL;
- desc = pango_font_describe (item->analysis.font);
- variant = pango_font_description_get_variant (desc);
- pango_font_description_free (desc);
+ if (item->analysis.font)
+ {
+ desc = pango_font_describe (item->analysis.font);
+ variant = pango_font_description_get_variant (desc);
+ pango_font_description_free (desc);
+ }
return variant;
}