summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTomeu Vizoso <tomeu.vizoso@collabora.co.uk>2011-01-21 15:32:52 +0100
committerTomeu Vizoso <tomeu.vizoso@collabora.co.uk>2011-01-21 15:32:52 +0100
commit313fc70cee983220b7580010062d19aed71a6ab0 (patch)
tree08609f44589bf8fbaebaf9531ceca53c70c6c910
parente9f99291c9cb11645128dff4292f9a0c6af86d96 (diff)
downloadgobject-introspection-313fc70cee983220b7580010062d19aed71a6ab0.tar.gz
[scanner] Don't crash if we don't have a ctype in array element types
-rw-r--r--giscanner/maintransformer.py3
1 files changed, 2 insertions, 1 deletions
diff --git a/giscanner/maintransformer.py b/giscanner/maintransformer.py
index ee945546..8520dd8e 100644
--- a/giscanner/maintransformer.py
+++ b/giscanner/maintransformer.py
@@ -326,7 +326,8 @@ usage is void (*_gtk_reserved1)(void);"""
# and no (element-type) means array of Foo
element_type_node = node.type.clone()
# The element's ctype is the array's dereferenced
- if element_type_node.ctype.endswith('*'):
+ if element_type_node.ctype is not None and \
+ element_type_node.ctype.endswith('*'):
element_type_node.ctype = element_type_node.ctype[:-1]
if isinstance(node.type, ast.Array):