fix compiler crash
authorStefan Behnel <stefan_ml@behnel.de>
Tue, 21 Aug 2012 17:01:36 +0000 (19:01 +0200)
committerStefan Behnel <stefan_ml@behnel.de>
Tue, 21 Aug 2012 17:01:36 +0000 (19:01 +0200)
Cython/Compiler/Nodes.py

index ed823b3..a5fcba2 100644 (file)
@@ -1199,7 +1199,8 @@ class CppClassNode(CStructOrUnionDefNode, BlockNode):
         if self.entry is None:
             return
         self.entry.is_cpp_class = 1
-        scope.type = self.entry.type
+        if scope is not None:
+            scope.type = self.entry.type
         defined_funcs = []
         if self.attributes is not None:
             if self.in_pxd and not env.in_cinclude: