From c911edecf89a0ba523a77f45f0a97c73ed186a25 Mon Sep 17 00:00:00 2001 From: Owen Taylor Date: Thu, 3 Feb 2005 23:24:51 +0000 Subject: Fix unpaired lock/unlock_face(). 2005-02-03 Owen Taylor * pango/pangofc-font.c (pango_fc_font_real_get_glyph): Fix unpaired lock/unlock_face(). --- pango/pangofc-font.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'pango/pangofc-font.c') diff --git a/pango/pangofc-font.c b/pango/pangofc-font.c index 65620384..fabb2f17 100644 --- a/pango/pangofc-font.c +++ b/pango/pangofc-font.c @@ -484,12 +484,12 @@ pango_fc_font_real_get_glyph (PangoFcFont *font, face = pango_fc_font_lock_face (font); index = FcFreeTypeCharIndex (face, wc); - if (index && index <= face->num_glyphs) - return index; + if (index > face->num_glyphs) + index = 0; pango_fc_font_unlock_face (font); - return 0; + return index; } /** -- cgit v1.2.1