[pango] Avoid a crash when FT_Face is null



commit 44d90b5771bf08e0e900596eb3a4db78c10d7f23
Author: Akira TAGOH <akira tagoh org>
Date:   Wed Feb 12 18:39:27 2014 +0900

    Avoid a crash when FT_Face is null
    
    https://bugzilla.gnome.org/show_bug.cgi?id=724006

 pango/pango-ot-info.c |    3 +++
 1 files changed, 3 insertions(+), 0 deletions(-)
---
diff --git a/pango/pango-ot-info.c b/pango/pango-ot-info.c
index f6dc1ac..d494d7f 100644
--- a/pango/pango-ot-info.c
+++ b/pango/pango-ot-info.c
@@ -88,6 +88,9 @@ pango_ot_info_get (FT_Face face)
 {
   PangoOTInfo *info;
 
+  if (G_UNLIKELY (!face))
+    return NULL;
+
   if (G_LIKELY (face->generic.data && face->generic.finalizer == pango_ot_info_finalizer))
     return face->generic.data;
   else


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]