summaryrefslogtreecommitdiff
path: root/pango/pango-engine.c
diff options
context:
space:
mode:
authorBehdad Esfahbod <behdad@behdad.org>2015-04-10 10:24:55 -0700
committerBehdad Esfahbod <behdad@behdad.org>2015-04-10 10:29:49 -0700
commitb110042886198dc51b82d1f9d4c957121ee336eb (patch)
tree6108c78377584932031513ea31220ff0f775db18 /pango/pango-engine.c
parent28df77e08b1f9c9ad27ba719465c2ff230516df0 (diff)
downloadpango-b110042886198dc51b82d1f9d4c957121ee336eb.tar.gz
Fix warnings if font is not found
Diffstat (limited to 'pango/pango-engine.c')
-rw-r--r--pango/pango-engine.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/pango/pango-engine.c b/pango/pango-engine.c
index 777132b7..f2797e48 100644
--- a/pango/pango-engine.c
+++ b/pango/pango-engine.c
@@ -153,8 +153,8 @@ _pango_engine_shape_covers (PangoEngineShape *engine,
PangoLanguage *language,
gunichar wc)
{
- g_return_val_if_fail (PANGO_IS_ENGINE_SHAPE (engine), PANGO_COVERAGE_NONE);
- g_return_val_if_fail (PANGO_IS_FONT (font), PANGO_COVERAGE_NONE);
+ if (G_UNLIKELY (!engine || !font))
+ return PANGO_COVERAGE_NONE;
return PANGO_ENGINE_SHAPE_GET_CLASS (engine)->covers (engine,
font,