Commit: 12583287e78505f45d62d9fd419371be66debf93
Author: Jorge Bernal
Date: Mon Jul 6 15:40:09 2015 +0200
Branches: master
https://developer.blender.org/rB12583287e78505f45d62d9fd419371be66debf93
BGE: Fix T45341: Crash when camera is eliminated
A null check is added to avoid crashes when the camera is removed during
the game and no other is available
===================================================================
M source/gameengine/Ketsji/KX_Scene.cpp
===================================================================
diff --git a/source/gameengine/Ketsji/KX_Scene.cpp
b/source/gameengine/Ketsji/KX_Scene.cpp
index 3a59654..d33cbb9 100644
--- a/source/gameengine/Ketsji/KX_Scene.cpp
+++ b/source/gameengine/Ketsji/KX_Scene.cpp
@@ -1756,6 +1756,10 @@ void KX_Scene::RenderFonts()
void KX_Scene::UpdateObjectLods(void)
{
KX_GameObject* gameobj;
+
+ if (!this->m_active_camera)
+ return;
+
MT_Vector3 cam_pos = this->m_active_camera->NodeGetWorldPosition();
for (int i = 0; i < this->GetObjectList()->GetCount(); i++) {
_______________________________________________
Bf-blender-cvs mailing list
[email protected]
http://lists.blender.org/mailman/listinfo/bf-blender-cvs