Fix a crash found by the fuzzer

This commit is contained in:
James Westman 2023-09-07 12:13:05 -05:00
parent 0f5be1b051
commit 3cd5daf025
No known key found for this signature in database
GPG key ID: CE2DBA0ADB654EA6

View file

@ -88,7 +88,7 @@ class Child(AstNode):
hints = [ hints = [
"only Gio.ListStore or Gtk.Buildable implementors can have children" "only Gio.ListStore or Gtk.Buildable implementors can have children"
] ]
if "child" in gir_class.properties: if hasattr(gir_class, "properties") and "child" in gir_class.properties:
hints.append( hints.append(
"did you mean to assign this object to the 'child' property?" "did you mean to assign this object to the 'child' property?"
) )