From eee26ed867167ee70e96904de6d719c5ead7a39d Mon Sep 17 00:00:00 2001 From: Michael Drake Date: Fri, 10 Aug 2012 12:09:53 +0100 Subject: Squash set but unused variable warning. --- framebuffer/font_freetype.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/framebuffer/font_freetype.c b/framebuffer/font_freetype.c index 581fd9a3d..c2279a116 100644 --- a/framebuffer/font_freetype.c +++ b/framebuffer/font_freetype.c @@ -396,7 +396,8 @@ FT_Glyph fb_getglyph(const plot_font_style_t *fstyle, uint32_t ucs4) fb_face = (fb_faceid_t *)srec.face_id; - glyph_index = FTC_CMapCache_Lookup(ft_cmap_cache, srec.face_id, fb_face->cidx, ucs4); + glyph_index = FTC_CMapCache_Lookup(ft_cmap_cache, srec.face_id, + fb_face->cidx, ucs4); error = FTC_ImageCache_LookupScaler(ft_image_cache, &srec, @@ -406,6 +407,8 @@ FT_Glyph fb_getglyph(const plot_font_style_t *fstyle, uint32_t ucs4) glyph_index, &glyph, NULL); + if (error != 0) + return NULL; return glyph; } -- cgit v1.2.3