Index: source/gameengine/Ketsji/KX_Scene.cpp =================================================================== --- source/gameengine/Ketsji/KX_Scene.cpp (r‚vision 13574) +++ source/gameengine/Ketsji/KX_Scene.cpp (copie de travail) @@ -171,12 +171,9 @@ KX_Scene::~KX_Scene() { -// int numobj = m_objectlist->GetCount(); - - //int numrootobjects = GetRootParentList()->GetCount(); - for (int i = 0; i < GetRootParentList()->GetCount(); i++) + while (GetRootParentList()->GetCount() > 0) { - KX_GameObject* parentobj = (KX_GameObject*) GetRootParentList()->GetValue(i); + KX_GameObject* parentobj = (KX_GameObject*) GetRootParentList()->GetValue(0); this->RemoveObject(parentobj); }