diff options
Diffstat (limited to 'source/gameengine')
-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 04a806dfd92..3818cef7d6e 100644 --- a/source/gameengine/Ketsji/KX_GameObject.cpp +++ b/source/gameengine/Ketsji/KX_GameObject.cpp @@ -1688,7 +1688,8 @@ PyObject* KX_GameObject::PyReplaceMesh(PyObject* args) PyObject* KX_GameObject::PyEndObject() { - KX_Scene *scene = KX_GetActiveScene(); + SG_Node* node = this->GetSGNode(); + KX_Scene* scene = static_cast<KX_Scene*>(node->GetSGClientInfo()); scene->DelayedRemoveObject(this); |