diff options
author | Behdad Esfahbod <behdad@behdad.org> | 2015-04-10 10:24:55 -0700 |
---|---|---|
committer | Behdad Esfahbod <behdad@behdad.org> | 2015-04-10 10:29:49 -0700 |
commit | b110042886198dc51b82d1f9d4c957121ee336eb (patch) | |
tree | 6108c78377584932031513ea31220ff0f775db18 /pango/fonts.c | |
parent | 28df77e08b1f9c9ad27ba719465c2ff230516df0 (diff) | |
download | pango-b110042886198dc51b82d1f9d4c957121ee336eb.tar.gz |
Fix warnings if font is not found
Diffstat (limited to 'pango/fonts.c')
-rw-r--r-- | pango/fonts.c | 3 |
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); |