[CRASH FIX] deleting type when not exists
authorAlan Knowles <alan@akbkhome.com>
Sat, 3 Apr 2010 10:10:52 +0000 (18:10 +0800)
committerAlan Knowles <alan@akbkhome.com>
Sat, 3 Apr 2010 10:10:52 +0000 (18:10 +0800)
This stops crashing happening when type tries to be deleted when it's not there.

giscanner/glibtransformer.py

index cfde94b..3e37855 100644 (file)
@@ -141,7 +141,7 @@ class GLibTransformer(object):
 
         # We don't want an alias for this - it's handled specially in
         # the typelib compiler.
-        if namespace.name == 'GObject':
+        if namespace.name == 'GObject' and self._names.aliases['Type']:
             del self._names.aliases['Type']
 
     def get_get_type_functions(self):