[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:
parent
dac86026a6
commit
500737e8e1
|
@ -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…
Reference in New Issue