From 64ba7c13039eb38c9346723a8686cf96369f980b Mon Sep 17 00:00:00 2001 From: Campbell Barton Date: Tue, 4 Aug 2009 22:59:50 +0000 Subject: fix for writing to freed memory in cases where python wasn't holding a reference to the PyObject --- source/gameengine/Expressions/PyObjectPlus.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'source/gameengine/Expressions/PyObjectPlus.cpp') diff --git a/source/gameengine/Expressions/PyObjectPlus.cpp b/source/gameengine/Expressions/PyObjectPlus.cpp index defb6853e67..921f608b772 100644 --- a/source/gameengine/Expressions/PyObjectPlus.cpp +++ b/source/gameengine/Expressions/PyObjectPlus.cpp @@ -85,8 +85,8 @@ PyTypeObject PyObjectPlus::Type = { PyObjectPlus::~PyObjectPlus() { if(m_proxy) { - Py_DECREF(m_proxy); /* Remove own reference, python may still have 1 */ BGE_PROXY_REF(m_proxy)= NULL; + Py_DECREF(m_proxy); /* Remove own reference, python may still have 1 */ } // assert(ob_refcnt==0); } -- cgit v1.2.3