From 29668ba2d03b7c81e12331d86adee4034991725a Mon Sep 17 00:00:00 2001 From: Campbell Barton Date: Thu, 14 Aug 2008 05:06:59 +0000 Subject: bugfix (good for 2.47) - 2 cases of returning Py_None without increfing it. this can crash blender. --- source/gameengine/Ketsji/KX_GameObject.cpp | 2 +- source/gameengine/Ketsji/KX_MeshProxy.cpp | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) (limited to 'source/gameengine/Ketsji') diff --git a/source/gameengine/Ketsji/KX_GameObject.cpp b/source/gameengine/Ketsji/KX_GameObject.cpp index 989cdabd491..ed05cd98ed0 100644 --- a/source/gameengine/Ketsji/KX_GameObject.cpp +++ b/source/gameengine/Ketsji/KX_GameObject.cpp @@ -942,7 +942,7 @@ PyObject* KX_GameObject::PyEndObject(PyObject* self) KX_Scene *scene = PHY_GetActiveScene(); scene->DelayedRemoveObject(this); - return Py_None; + Py_RETURN_NONE; } diff --git a/source/gameengine/Ketsji/KX_MeshProxy.cpp b/source/gameengine/Ketsji/KX_MeshProxy.cpp index 7bffb5ac854..a0ac9cfd4ff 100644 --- a/source/gameengine/Ketsji/KX_MeshProxy.cpp +++ b/source/gameengine/Ketsji/KX_MeshProxy.cpp @@ -238,5 +238,5 @@ KX_PYMETHODDEF_DOC(KX_MeshProxy, reinstancePhysicsMesh, "Reinstance the physics mesh.") { //this needs to be reviewed, it is dependend on Sumo/Solid. Who is using this ? - return Py_None;//(KX_ReInstanceShapeFromMesh(m_meshobj)) ? Py_RETURN_TRUE : Py_RETURN_FALSE; + Py_RETURN_NONE;//(KX_ReInstanceShapeFromMesh(m_meshobj)) ? Py_RETURN_TRUE : Py_RETURN_FALSE; } -- cgit v1.2.3