diff --git a/source/gameengine/Ketsji/KX_GameObject.cpp b/source/gameengine/Ketsji/KX_GameObject.cpp index c681e0842c4..dc246406a88 100644 --- a/source/gameengine/Ketsji/KX_GameObject.cpp +++ b/source/gameengine/Ketsji/KX_GameObject.cpp @@ -1587,9 +1587,10 @@ CListValue* KX_GameObject::GetChildrenRecursive() KX_Scene* KX_GameObject::GetScene() { SG_Node* node = this->GetSGNode(); - KX_Scene* scene = static_cast(node->GetSGClientInfo()); - - return scene; + if (node == NULL) + // this happens for object in non active layers, rely on static scene then + return KX_GetActiveScene(); + return static_cast(node->GetSGClientInfo()); } /* ---------------------------------------------------------------------