Fix crash in flags value for unchecked classes

This commit is contained in:
James Westman 2022-04-18 15:38:04 -05:00
parent 3f8b38d219
commit 417f163a5a
No known key found for this signature in database
GPG key ID: CE2DBA0ADB654EA6
5 changed files with 13 additions and 3 deletions

View file

@ -133,7 +133,7 @@ class FlagsValue(Value):
@validate()
def parent_is_bitfield(self):
type = self.parent.value_type
if not isinstance(type, gir.Bitfield):
if type is not None and not isinstance(type, gir.Bitfield):
raise CompileError(f"{type.full_name} is not a bitfield type")
def emit_xml(self, xml: XmlEmitter):