Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMitchell Stokes <mogurijin@gmail.com>2010-11-19 07:06:06 +0300
committerMitchell Stokes <mogurijin@gmail.com>2010-11-19 07:06:06 +0300
commit844e63f3b60a5a07af8a6454dec3c6b4939ae886 (patch)
tree7702107e75ddd0e04f5a723ed9270f7d38fb05de /source/gameengine
parentd4a2972a21d025481f70b7c1b5c66595eb57cfe1 (diff)
Fixing a crash when dynamically loading a scene that contains a bone parent.
Diffstat (limited to 'source/gameengine')
-rw-r--r--source/gameengine/Ketsji/KX_Scene.cpp5
1 files changed, 5 insertions, 0 deletions
diff --git a/source/gameengine/Ketsji/KX_Scene.cpp b/source/gameengine/Ketsji/KX_Scene.cpp
index c48112dbcb7..0605650bb09 100644
--- a/source/gameengine/Ketsji/KX_Scene.cpp
+++ b/source/gameengine/Ketsji/KX_Scene.cpp
@@ -1722,6 +1722,11 @@ static void MergeScene_GameObject(KX_GameObject* gameobj, KX_Scene *to, KX_Scene
if(sg) {
if(sg->GetSGClientInfo() == from) {
sg->SetSGClientInfo(to);
+
+ /* Make sure to grab the children too since they might not be tied to a game object */
+ NodeList children = sg->GetSGChildren();
+ for (int i=0; i<children.size(); i++)
+ children[i]->SetSGClientInfo(to);
}
#ifdef USE_BULLET
SGControllerList::iterator contit;