Small fix
authorDag Sverre Seljebotn <dagss@student.matnat.uio.no>
Sun, 30 Nov 2008 10:42:22 +0000 (11:42 +0100)
committerDag Sverre Seljebotn <dagss@student.matnat.uio.no>
Sun, 30 Nov 2008 10:42:22 +0000 (11:42 +0100)
Cython/Compiler/ExprNodes.py

index 51fc3a48fef24c1047dacbc0dd0f600d89173e31..5ebc8f55f128f0bdc5609413fb07939365ad956a 100644 (file)
@@ -594,7 +594,9 @@ class NewTempExprNode(ExprNode):
 
     def allocate_target_temps(self, env, rhs):
         self.allocate_subexpr_temps(env)
-        rhs.release_temp(rhs)
+        self.is_target = True
+        if rhs:
+            rhs.release_temp(env)
         self.release_subexpr_temps(env)
 
     def allocate_temps(self, env, result = None):