diff options
Diffstat (limited to 'giscanner')
-rw-r--r-- | giscanner/maintransformer.py | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/giscanner/maintransformer.py b/giscanner/maintransformer.py index e069a2e..533db8f 100644 --- a/giscanner/maintransformer.py +++ b/giscanner/maintransformer.py @@ -285,10 +285,10 @@ usage is void (*_gtk_reserved1)(void);""" if not result.resolved: parent = orig_node - if isinstance(parent, ast.Function): + if parent is not None and isinstance(parent, ast.Function): text = parent.symbol else: - text = parent.name + text = type_str message.warn_node(parent, "%s: Unknown type: %r" % (text, result.ctype)) return result |