[Bf-blender-cvs] SVN commit: /data/svn/bf-blender [22215] trunk/blender/source/gameengine/ Expressions/PyObjectPlus.cpp: fix for writing to freed memory in cases where python wasn' t holding a reference to the PyObject

Campbell Barton ideasman42 at gmail.com
Wed Aug 5 00:59:51 CEST 2009


Revision: 22215
          http://projects.blender.org/plugins/scmsvn/viewcvs.php?view=rev&root=bf-blender&revision=22215
Author:   campbellbarton
Date:     2009-08-05 00:59:50 +0200 (Wed, 05 Aug 2009)

Log Message:
-----------
fix for writing to freed memory in cases where python wasn't holding a reference to the PyObject

Modified Paths:
--------------
    trunk/blender/source/gameengine/Expressions/PyObjectPlus.cpp

Modified: trunk/blender/source/gameengine/Expressions/PyObjectPlus.cpp
===================================================================
--- trunk/blender/source/gameengine/Expressions/PyObjectPlus.cpp	2009-08-04 18:03:04 UTC (rev 22214)
+++ trunk/blender/source/gameengine/Expressions/PyObjectPlus.cpp	2009-08-04 22:59:50 UTC (rev 22215)
@@ -85,8 +85,8 @@
 PyObjectPlus::~PyObjectPlus()
 {
 	if(m_proxy) {
+		BGE_PROXY_REF(m_proxy)= NULL;
 		Py_DECREF(m_proxy);			/* Remove own reference, python may still have 1 */
-		BGE_PROXY_REF(m_proxy)= NULL;
 	}
 //	assert(ob_refcnt==0);
 }





More information about the Bf-blender-cvs mailing list