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

Can happen either in broken fonts, or as a result of sanitize().
This commit is contained in:
Behdad Esfahbod 2014-06-04 18:17:29 -04:00
parent dac86026a6
commit 500737e8e1
1 changed files with 1 additions and 1 deletions

View File

@ -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);