BGE: fix [#32775] LibFree crashing

Used the engine's RemoveScene (which ultimately calls the converter's RemoveScene) instead of the converter's RemoveScene when the converter free a blend file. This handles the scene removal in a safer fashion and solves the crash described in part 2 of the bug report. Part 1 no longer appears to cause a crash.
This commit is contained in:
Daniel Stokes
2013-06-21 06:56:43 +00:00
parent e101b043e1
commit d6f38e4e01

View File

@@ -1261,7 +1261,7 @@ bool KX_BlenderSceneConverter::FreeBlendFile(struct Main *maggie)
{
KX_Scene* scene = scenes->at(scene_idx);
if (IS_TAGGED(scene->GetBlenderScene())) {
RemoveScene(scene); // XXX - not tested yet
m_ketsjiEngine->RemoveScene(scene->GetName());
scene_idx--;
numScenes--;
}