summaryrefslogtreecommitdiff
path: root/giscanner
diff options
context:
space:
mode:
Diffstat (limited to 'giscanner')
-rw-r--r--giscanner/transformer.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/giscanner/transformer.py b/giscanner/transformer.py
index cc9e0b54..10d88dfe 100644
--- a/giscanner/transformer.py
+++ b/giscanner/transformer.py
@@ -501,7 +501,7 @@ class Transformer(object):
def _create_const(self, symbol):
# Don't create constants for non-public things
# http://bugzilla.gnome.org/show_bug.cgi?id=572790
- if not symbol.source_filename.endswith('.h'):
+ if symbol.source_filename is None or not symbol.source_filename.endswith('.h'):
return None
name = self.remove_prefix(symbol.ident)
if symbol.const_string is not None: