[sanitize] In lookup sanitize don't try to access subtable 0 if it isn't there.

pull/3295/head
Garret Rieger 3 years ago committed by Behdad Esfahbod
parent 82a9f54410
commit a75b96f7e5
  1. 2
      src/hb-ot-layout-common.hh

@ -1357,7 +1357,7 @@ struct Lookup
if (unlikely (!get_subtables<TSubTable> ().sanitize (c, this, get_type ())))
return_trace (false);
if (unlikely (get_type () == TSubTable::Extension && !c->get_edit_count ()))
if (unlikely (get_type () == TSubTable::Extension && subtables && !c->get_edit_count ()))
{
/* The spec says all subtables of an Extension lookup should
* have the same type, which shall not be the Extension type

Loading…
Cancel
Save