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:
@@ -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--;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user