From 1ab1d3e38cdf8e7331efdbc4ef0c02ee9d5c8c04 Mon Sep 17 00:00:00 2001 From: Behdad Esfahbod Date: Mon, 2 May 2011 19:35:53 -0400 Subject: [PATCH] [face] Return nil face if blob is inert --- src/hb-font.cc | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/hb-font.cc b/src/hb-font.cc index 5e4d379..0a62fe3 100644 --- a/src/hb-font.cc +++ b/src/hb-font.cc @@ -379,6 +379,9 @@ hb_face_t * hb_face_create_for_data (hb_blob_t *blob, unsigned int index) { + if (unlikely (hb_object_is_inert (blob))) + return &_hb_face_nil; + hb_face_for_data_closure_t *closure = _hb_face_for_data_closure_create (Sanitizer::sanitize (hb_blob_reference (blob)), index); if (unlikely (!closure)) -- 2.7.4