diff --git a/src/hb-ot-layout-gpos-table.hh b/src/hb-ot-layout-gpos-table.hh index 92aa94cb4ec3dee5a0a450496ce56ae6499ab296..41cb93d02492354a866089c5ac42a051b0137873 100644 --- a/src/hb-ot-layout-gpos-table.hh +++ b/src/hb-ot-layout-gpos-table.hh @@ -1535,7 +1535,7 @@ struct PosLookup : Lookup { bool ret = false; - if (unlikely (!c->buffer->len)) + if (unlikely (!c->buffer->len || !c->lookup_mask)) return false; c->set_lookup (*this); diff --git a/src/hb-ot-layout-gsub-table.hh b/src/hb-ot-layout-gsub-table.hh index cbea46d764843575c8fe85de50c4668bff0a4b1f..bbd7214d0e0600975842ef2baead3802933c36d6 100644 --- a/src/hb-ot-layout-gsub-table.hh +++ b/src/hb-ot-layout-gsub-table.hh @@ -1316,7 +1316,7 @@ struct SubstLookup : Lookup { bool ret = false; - if (unlikely (!c->buffer->len)) + if (unlikely (!c->buffer->len || !c->lookup_mask)) return false; c->set_lookup (*this);