diff options
author | Mitchell Stokes <mogurijin@gmail.com> | 2011-03-20 01:47:51 +0300 |
---|---|---|
committer | Mitchell Stokes <mogurijin@gmail.com> | 2011-03-20 01:47:51 +0300 |
commit | 35dbf67c0019d433ba1be2dc52ced592f591afd1 (patch) | |
tree | debec5f976eddc69d055cdbba693c78cf84b0527 /source/gameengine | |
parent | 815a795be951747617920074ed2f223c88a6a468 (diff) |
Fixing the other crash mentioned in bug #25083. m_current_scene isn't always pointing to valid memory by the time LinkBlendFile is called. So, use the supplied scene_merge scene instead. Scene LibLoad was already doing this, so I just made Mesh and Action follow suit.
Diffstat (limited to 'source/gameengine')
-rw-r--r-- | source/gameengine/Converter/KX_BlenderSceneConverter.cpp | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/source/gameengine/Converter/KX_BlenderSceneConverter.cpp b/source/gameengine/Converter/KX_BlenderSceneConverter.cpp index 245125456bd..34be0d4d15f 100644 --- a/source/gameengine/Converter/KX_BlenderSceneConverter.cpp +++ b/source/gameengine/Converter/KX_BlenderSceneConverter.cpp @@ -1012,21 +1012,19 @@ bool KX_BlenderSceneConverter::LinkBlendFile(BlendHandle *bpy_openlib, const cha if(idcode==ID_ME) { /* Convert all new meshes into BGE meshes */ ID* mesh; - KX_Scene *kx_scene= m_currentScene; for(mesh= (ID *)main_newlib->mesh.first; mesh; mesh= (ID *)mesh->next ) { RAS_MeshObject *meshobj = BL_ConvertMesh((Mesh *)mesh, NULL, scene_merge, this); - kx_scene->GetLogicManager()->RegisterMeshName(meshobj->GetName(),meshobj); + scene_merge->GetLogicManager()->RegisterMeshName(meshobj->GetName(),meshobj); } } else if(idcode==ID_AC) { /* Convert all actions */ ID *action; - KX_Scene *kx_scene= m_currentScene; for(action= (ID *)main_newlib->action.first; action; action= (ID *)action->next) { printf("ActionName: %s\n", action->name); - kx_scene->GetLogicManager()->RegisterActionName(action->name+2, action); + scene_merge->GetLogicManager()->RegisterActionName(action->name+2, action); } } else if(idcode==ID_SCE) { |