22 lines
847 B
Diff
22 lines
847 B
Diff
diff --git a/pango/pango-layout.c b/pango/pango-layout.c
|
|
index a1c47203..b8eeede0 100644
|
|
--- a/pango/pango-layout.c
|
|
+++ b/pango/pango-layout.c
|
|
@@ -5707,13 +5707,14 @@ pango_layout_run_get_extents_and_height (PangoLayoutRun *run,
|
|
}
|
|
else
|
|
{
|
|
- double xscale, yscale;
|
|
+ double xscale = 0, yscale = 0;
|
|
|
|
if (!metrics)
|
|
metrics = pango_font_get_metrics (run->item->analysis.font,
|
|
run->item->analysis.language);
|
|
|
|
- pango_font_get_scale_factors (run->item->analysis.font, &xscale, &yscale);
|
|
+ if (G_LIKELY(run->item->analysis.font))
|
|
+ pango_font_get_scale_factors (run->item->analysis.font, &xscale, &yscale);
|
|
*height = pango_font_metrics_get_height (metrics) * MAX (xscale, yscale);
|
|
}
|
|
}
|