diff options
author | Colin Walters <walters@verbum.org> | 2009-08-16 23:21:20 -0400 |
---|---|---|
committer | Colin Walters <walters@verbum.org> | 2009-08-16 23:22:35 -0400 |
commit | c35c88f77c996b99827c3ef4e9ac69fe379629b4 (patch) | |
tree | f497307aeebb66872ca2f897e88748705de81794 /giscanner | |
parent | a065ef184b3b1d90dc9af9cbe89093542b5e1853 (diff) | |
download | gobject-introspection-c35c88f77c996b99827c3ef4e9ac69fe379629b4.tar.gz |
Protect against source_filename being None when analyzing constants
It's allowed for source_filename to be None if we can't match it
up with a file, so just skip the constant in that case.
Diffstat (limited to 'giscanner')
-rw-r--r-- | giscanner/transformer.py | 2 |
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: |