summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--pango/fonts.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/pango/fonts.c b/pango/fonts.c
index e7bd4780..47671424 100644
--- a/pango/fonts.c
+++ b/pango/fonts.c
@@ -2871,5 +2871,11 @@ pango_font_get_scale_factors (PangoFont *font,
double *x_scale,
double *y_scale)
{
+ if (G_UNLIKELY (!font))
+ {
+ *x_scale = *y_scale = .1;
+ return;
+ }
+
PANGO_FONT_GET_CLASS_PRIVATE (font)->get_scale_factors (font, x_scale, y_scale);
}