summaryrefslogtreecommitdiff
path: root/modules
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
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')
-rw-r--r--modules/arabic/arabic-fc.c3
-rw-r--r--modules/basic/basic-fc.c3
-rw-r--r--modules/hebrew/hebrew-fc.c3
-rw-r--r--modules/indic/indic-fc.c3
-rw-r--r--modules/khmer/khmer-fc.c3
-rw-r--r--modules/syriac/syriac-fc.c3
-rw-r--r--modules/thai/thai-ot.c6
-rw-r--r--modules/tibetan/tibetan-fc.c3
8 files changed, 18 insertions, 9 deletions
diff --git a/modules/arabic/arabic-fc.c b/modules/arabic/arabic-fc.c
index 0b3faefa..e6fc5ef4 100644
--- a/modules/arabic/arabic-fc.c
+++ b/modules/arabic/arabic-fc.c
@@ -274,7 +274,8 @@ arabic_engine_shape (PangoEngineShape *engine,
fc_font = PANGO_FC_FONT (font);
face = pango_fc_font_lock_face (fc_font);
- g_return_if_fail (face != NULL);
+ if (!face)
+ return;
ruleset = get_ruleset (face);
if (!ruleset)
diff --git a/modules/basic/basic-fc.c b/modules/basic/basic-fc.c
index dc77ef00..626608be 100644
--- a/modules/basic/basic-fc.c
+++ b/modules/basic/basic-fc.c
@@ -344,7 +344,8 @@ basic_engine_shape (PangoEngineShape *engine,
fc_font = PANGO_FC_FONT (font);
face = pango_fc_font_lock_face (fc_font);
- g_return_if_fail (face != NULL);
+ if (!face)
+ return;
ruleset = get_ruleset (face);
if (!ruleset)
diff --git a/modules/hebrew/hebrew-fc.c b/modules/hebrew/hebrew-fc.c
index dcb45b40..8b6ae03c 100644
--- a/modules/hebrew/hebrew-fc.c
+++ b/modules/hebrew/hebrew-fc.c
@@ -312,7 +312,8 @@ hebrew_engine_shape (PangoEngineShape *engine,
fc_font = PANGO_FC_FONT (font);
face = pango_fc_font_lock_face (fc_font);
- g_return_if_fail (face != NULL);
+ if (!face)
+ return;
ruleset = get_ruleset (face);
if (!ruleset)
diff --git a/modules/indic/indic-fc.c b/modules/indic/indic-fc.c
index 3011a66a..4947b5b5 100644
--- a/modules/indic/indic-fc.c
+++ b/modules/indic/indic-fc.c
@@ -344,7 +344,8 @@ indic_engine_shape (PangoEngineShape *engine,
fc_font = PANGO_FC_FONT (font);
face = pango_fc_font_lock_face (fc_font);
- g_return_if_fail (face != NULL);
+ if (!face)
+ return;
indic_shape_engine = (IndicEngineFc *) engine;
diff --git a/modules/khmer/khmer-fc.c b/modules/khmer/khmer-fc.c
index 9fd9bab5..82541e44 100644
--- a/modules/khmer/khmer-fc.c
+++ b/modules/khmer/khmer-fc.c
@@ -541,7 +541,8 @@ khmer_engine_shape (PangoEngineShape *engine,
fc_font = PANGO_FC_FONT (font);
face = pango_fc_font_lock_face (fc_font);
- g_return_if_fail (face != NULL);
+ if (!face)
+ return;
buffer = pango_ot_buffer_new (fc_font);
diff --git a/modules/syriac/syriac-fc.c b/modules/syriac/syriac-fc.c
index 1e10df3e..dab11efc 100644
--- a/modules/syriac/syriac-fc.c
+++ b/modules/syriac/syriac-fc.c
@@ -266,7 +266,8 @@ syriac_engine_shape (PangoEngineShape *engine,
fc_font = PANGO_FC_FONT (font);
face = pango_fc_font_lock_face (fc_font);
- g_return_if_fail (face != NULL);
+ if (!face)
+ return;
ruleset = get_ruleset (face);
if (!ruleset)
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)
diff --git a/modules/tibetan/tibetan-fc.c b/modules/tibetan/tibetan-fc.c
index 1781edca..b4348c05 100644
--- a/modules/tibetan/tibetan-fc.c
+++ b/modules/tibetan/tibetan-fc.c
@@ -506,7 +506,8 @@ tibetan_engine_shape (PangoEngineShape *engine,
fc_font = PANGO_FC_FONT (font);
face = pango_fc_font_lock_face (fc_font);
- g_return_if_fail (face != NULL);
+ if (!face)
+ return;
buffer = pango_ot_buffer_new (fc_font);