summaryrefslogtreecommitdiff
path: root/pango/fonts.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/fonts.c
parent28df77e08b1f9c9ad27ba719465c2ff230516df0 (diff)
downloadpango-b110042886198dc51b82d1f9d4c957121ee336eb.tar.gz
Fix warnings if font is not found
Diffstat (limited to 'pango/fonts.c')
-rw-r--r--pango/fonts.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/pango/fonts.c b/pango/fonts.c
index 52ef72df..6b7d9495 100644
--- a/pango/fonts.c
+++ b/pango/fonts.c
@@ -1558,7 +1558,8 @@ pango_font_find_shaper (PangoFont *font,
{
PangoEngineShape* shaper;
- g_return_val_if_fail (font != NULL, NULL);
+ if (G_UNLIKELY (!font))
+ return NULL;
shaper = PANGO_FONT_GET_CLASS (font)->find_shaper (font, language, ch);