commit | b435ab7e29c388e3b100f729957319931625a3a8 | [log] [tgz] |
---|---|---|
author | Behdad Esfahbod <behdad@behdad.org> | Mon May 10 19:51:57 2010 -0400 |
committer | Behdad Esfahbod <behdad@behdad.org> | Mon May 10 19:51:57 2010 -0400 |
tree | 5d304a1c6b7ca4bf89b7d85f5f6c456fc91523e5 | |
parent | dacebcadae36b35531d635d81df2afb937677b7a [diff] [blame] |
Fix accessing tables from NULL pointer
diff --git a/src/hb-open-type-private.hh b/src/hb-open-type-private.hh index 023df83..8c3e8a4 100644 --- a/src/hb-open-type-private.hh +++ b/src/hb-open-type-private.hh
@@ -330,6 +330,11 @@ return hb_blob_create_empty (); } } + + static const Type* lock_instance (hb_blob_t *blob) { + const char *base = hb_blob_lock (blob); + return unlikely (!base) ? &Null(Type) : CastP<Type> (base); + } };