summaryrefslogtreecommitdiff
path: root/modules/thai
diff options
context:
space:
mode:
authorBehdad Esfahbod <behdad@gnome.org>2006-02-21 10:47:30 +0000
committerBehdad Esfahbod <behdad@src.gnome.org>2006-02-21 10:47:30 +0000
commite0babd9ed3f94843d2d8833592bd55895769c009 (patch)
tree764c7f23486a5d0ce9b4e86fc664870867402ebb /modules/thai
parentf3f321992201a5daa52bc44042858b2a9992b672 (diff)
downloadpango-e0babd9ed3f94843d2d8833592bd55895769c009.tar.gz
Bug 331723 – shapers should not crash on failures
2006-02-21 Behdad Esfahbod <behdad@gnome.org> Bug 331723 – shapers should not crash on failures * modules/*/*-fc.c: Return instead of g_return_if_fail when face == NULL. * pango/pango-engine.h (PangoEngineShape): Document that a shaper should return an empty glyph string on failure.
Diffstat (limited to 'modules/thai')
-rw-r--r--modules/thai/thai-ot.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/modules/thai/thai-ot.c b/modules/thai/thai-ot.c
index 23c20190..00b06380 100644
--- a/modules/thai/thai-ot.c
+++ b/modules/thai/thai-ot.c
@@ -76,7 +76,8 @@ thai_ot_get_ruleset (PangoFont *font)
fc_font = PANGO_FC_FONT (font);
face = pango_fc_font_lock_face (fc_font);
- g_return_val_if_fail (face != NULL, NULL);
+ if (!face)
+ return NULL;
info = pango_ot_info_get (face);
if (info != NULL)
@@ -148,7 +149,8 @@ lao_ot_get_ruleset (PangoFont *font)
fc_font = PANGO_FC_FONT (font);
face = pango_fc_font_lock_face (fc_font);
- g_return_val_if_fail (face != NULL, NULL);
+ if (!face)
+ return NULL;
info = pango_ot_info_get (face);
if (info != NULL)