[ot-font] Don't select a Null cmap subtable

Can happen either in broken fonts, or as a result of sanitize().
pull/43/merge
Behdad Esfahbod 11 years ago
parent dac86026a6
commit 500737e8e1
  1. 2
      src/hb-ot-cmap-table.hh

@ -354,7 +354,7 @@ struct cmap
key.encodingID.set (encoding_id);
int result = encodingRecord.search (key);
if (result == -1)
if (result == -1 || !encodingRecord[result].subtable)
return NULL;
return &(this+encodingRecord[result].subtable);

Loading…
Cancel
Save