subset: don't try subsetting ClipList if None

This commit is contained in:
Cosimo Lupo 2021-10-11 16:48:00 +02:00
parent 6df6db840e
commit 5c54f4e666

View File

@ -2089,8 +2089,9 @@ def subset_glyphs(self, s):
)
del self.ColorLayersV1
clips = self.table.ClipList.clips
self.table.ClipList.clips = {g: clips[g] for g in clips if g in s.glyphs}
if self.table.ClipList is not None:
clips = self.table.ClipList.clips
self.table.ClipList.clips = {g: clips[g] for g in clips if g in s.glyphs}
layersV0 = self.ColorLayers
if not self.table.BaseGlyphList.BaseGlyphPaintRecord: