Commit 777eb626 authored by Xavier Thompson's avatar Xavier Thompson

Fix runtime isolation check on NULL pointer

parent 0c42e8eb
......@@ -11414,9 +11414,10 @@ class ConsumeNode(ExprNode):
def generate_result_code(self, code):
if self.is_temp:
operand_result = self.operand.result()
code.putln("%s = %s;" % (self.result(), operand_result))
result_code = self.result()
code.putln("%s = %s;" % (result_code, operand_result))
if self.generate_runtime_check:
code.putln("if (!%s->CyObject_iso()) {" % self.result())
code.putln("if (%s != NULL && !%s->CyObject_iso()) {" % (result_code, result_code))
if self.nogil:
code.putln("#ifdef WITH_THREAD")
code.putln("PyGILState_STATE _save = PyGILState_Ensure();")
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment