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);
+  }
 };