[merge] LookupList may be None

This commit is contained in:
Cosimo Lupo 2018-03-15 20:18:30 +00:00
parent 88f495dd68
commit 3dbb7f763f
No known key found for this signature in database
GPG Key ID: 59D54DB0C9976482

View File

@ -637,6 +637,13 @@ def merge(self, m, tables):
synthLookup.LookupType = 1
synthLookup.SubTableCount = 1
synthLookup.SubTable = [subtable]
if table.table.LookupList is None:
# mtiLib uses None as default value for LookupList,
# while feaLib points to an empty array with count 0
# TODO: make them do the same
table.table.LookupList = otTables.LookupList()
table.table.LookupList.Lookup = []
table.table.LookupList.LookupCount = 0
table.table.LookupList.Lookup.append(synthLookup)
table.table.LookupList.LookupCount += 1