diff options
author | Campbell Barton <ideasman42@gmail.com> | 2011-02-27 07:01:58 +0300 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2011-02-27 07:01:58 +0300 |
commit | f73c993b16c4083f0c72b87ba3f70fa12a5077df (patch) | |
tree | 04031cd45ed05cc542132df2e7554bcf63d3606e /source/gameengine/Ketsji/KX_GameObject.cpp | |
parent | a11c80d3bb254037ecb37476feeec5529bb02434 (diff) |
- use Py_CLEAR for python internally referencing other PyObjects (supposed to be safer).
- detect includes for qtcreator projects as well as the ones from cmake (it didnt return all of the right paths).
Diffstat (limited to 'source/gameengine/Ketsji/KX_GameObject.cpp')
-rw-r--r-- | source/gameengine/Ketsji/KX_GameObject.cpp | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/source/gameengine/Ketsji/KX_GameObject.cpp b/source/gameengine/Ketsji/KX_GameObject.cpp index 5ca780bb319..93d67e92dd5 100644 --- a/source/gameengine/Ketsji/KX_GameObject.cpp +++ b/source/gameengine/Ketsji/KX_GameObject.cpp @@ -157,7 +157,8 @@ KX_GameObject::~KX_GameObject() #ifdef WITH_PYTHON if (m_attr_dict) { PyDict_Clear(m_attr_dict); /* incase of circular refs or other weired cases */ - Py_DECREF(m_attr_dict); + /* Py_CLEAR: Py_DECREF's and NULL's */ + Py_CLEAR(m_attr_dict); } #endif // WITH_PYTHON } |