From: Behdad Esfahbod Date: Tue, 3 May 2011 00:18:58 +0000 (-0400) Subject: Protect NULL in a couple places X-Git-Tag: submit/2.0alpha-wayland/20121130.004132~9^2~270 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=cec6611c5ce84d69d910bf7e9ec1fdd594398f9f;p=profile%2Fivi%2Forg.tizen.video-player.git Protect NULL in a couple places --- diff --git a/src/hb-font.cc b/src/hb-font.cc index 91dde45..2de3950 100644 --- a/src/hb-font.cc +++ b/src/hb-font.cc @@ -312,7 +312,7 @@ hb_face_create_for_tables (hb_get_table_func_t get_table, { hb_face_t *face; - if (!(face = hb_object_create ())) { + if (!get_table || !(face = hb_object_create ())) { if (destroy) destroy (user_data); return &_hb_face_nil; @@ -379,7 +379,7 @@ hb_face_t * hb_face_create_for_data (hb_blob_t *blob, unsigned int index) { - if (unlikely (hb_object_is_inert (blob))) + if (unlikely (!blob || 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); @@ -434,7 +434,7 @@ hb_face_get_user_data (hb_face_t *face, hb_blob_t * hb_face_reference_table (hb_face_t *face, - hb_tag_t tag) + hb_tag_t tag) { hb_blob_t *blob;