diff options
author | Campbell Barton <ideasman42@gmail.com> | 2009-05-08 02:06:27 +0400 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2009-05-08 02:06:27 +0400 |
commit | cdba1ddd5d454aca4d39dbb01866c155421b5d11 (patch) | |
tree | 61daee071a00e619f20ac04851a781df40e6410b /source/gameengine/Expressions/PyObjectPlus.cpp | |
parent | e1c958c3648ef903777f49b9fb6d4230af316885 (diff) |
BGE Python owned proxies had a problem being decref'd twice, this would crash on freeing KX_Vertex/Poly Proxy types when python was compiled with debug options enabled.
add_mesh_torus.py wasnt tested from update, will go through all edited scripts and test :\
Diffstat (limited to 'source/gameengine/Expressions/PyObjectPlus.cpp')
-rw-r--r-- | source/gameengine/Expressions/PyObjectPlus.cpp | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/source/gameengine/Expressions/PyObjectPlus.cpp b/source/gameengine/Expressions/PyObjectPlus.cpp index 82f67a9b007..7d302246c70 100644 --- a/source/gameengine/Expressions/PyObjectPlus.cpp +++ b/source/gameengine/Expressions/PyObjectPlus.cpp @@ -95,6 +95,7 @@ void PyObjectPlus::py_base_dealloc(PyObject *self) // python wrapper PyObjectPlus *self_plus= BGE_PROXY_REF(self); if(self_plus) { if(BGE_PROXY_PYOWNS(self)) { /* Does python own this?, then delete it */ + self_plus->m_proxy = NULL; /* Need this to stop ~PyObjectPlus from decrefing m_proxy otherwise its decref'd twice and py-debug crashes */ delete self_plus; } |