summaryrefslogtreecommitdiff
path: root/pango/pangoatsui-fontmap.c
diff options
context:
space:
mode:
authorRichard Hult <richard@imendio.com>2006-07-17 13:19:25 +0000
committerRichard Hult <rhult@src.gnome.org>2006-07-17 13:19:25 +0000
commit31ba75138bff6e701a5473f0ffcd765781384eea (patch)
tree92e51ccf00c093f10afb095c48446bcf73a32c11 /pango/pangoatsui-fontmap.c
parenta3c8c1e15f8644c003c97e906bb0a0aa12e828c5 (diff)
downloadpango-31ba75138bff6e701a5473f0ffcd765781384eea.tar.gz
Bug 347021 – atsui crash when a matching font cannot be found. Patch
2006-07-17 Richard Hult <richard@imendio.com> Bug 347021 – atsui crash when a matching font cannot be found. Patch from Brian Tarricone. * pango/pangoatsui-fontmap.c (pango_atsui_font_map_load_font): Bail out if best desc or best face isn't found.
Diffstat (limited to 'pango/pangoatsui-fontmap.c')
-rw-r--r--pango/pangoatsui-fontmap.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/pango/pangoatsui-fontmap.c b/pango/pangoatsui-fontmap.c
index 52662978..059731da 100644
--- a/pango/pangoatsui-fontmap.c
+++ b/pango/pangoatsui-fontmap.c
@@ -578,6 +578,9 @@ pango_atsui_font_map_load_font (PangoFontMap *fontmap,
}
}
+ if (best_desc == NULL || best_face == NULL)
+ return NULL;
+
pango_font_description_set_size (best_desc, size);
best_font = pango_atsui_font_map_lookup (atsuifontmap, context, best_desc, best_face->postscript_name);