diff --git a/Lib/fontTools/feaLib/parser.py b/Lib/fontTools/feaLib/parser.py index 6020b158ff..39feac2d85 100644 --- a/Lib/fontTools/feaLib/parser.py +++ b/Lib/fontTools/feaLib/parser.py @@ -416,6 +416,11 @@ def parse_glyphclass_(self, accept_glyphname, accept_null=False): self.next_token_location_, ) self.expect_symbol_("]") + if not glyphs.glyphSet(): + raise FeatureLibError( + "Glyph class cannot be empty", + self.cur_token_location_, + ) return glyphs def parse_glyph_pattern_(self, vertical):