diff options
author | Campbell Barton <ideasman42@gmail.com> | 2014-10-11 16:17:14 +0400 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2014-10-11 16:22:54 +0400 |
commit | 54ee22130ca0ce59500c6eddb562b78eb4526bcd (patch) | |
tree | ba21cdaa35656c590059c864e028e24b6e234082 /source/gameengine/Ketsji/KX_GameObject.cpp | |
parent | b09f7dcaa7b487ada53c8dbaa811deaa1201d163 (diff) | |
parent | 04814476c08e9350c424619cd99ccb1149d65365 (diff) |
Merge branch 'master' into dyntopo_holesdyntopo_holes
Conflicts:
source/blender/blenkernel/intern/pbvh_bmesh.c
Diffstat (limited to 'source/gameengine/Ketsji/KX_GameObject.cpp')
-rw-r--r-- | source/gameengine/Ketsji/KX_GameObject.cpp | 7 |
1 files changed, 4 insertions, 3 deletions
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<KX_Scene*>(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<KX_Scene*>(node->GetSGClientInfo()); } /* --------------------------------------------------------------------- |