Force global rando context's Logic child to release its parent Context reference. (#4429)

This commit is contained in:
Malkierian
2024-10-16 20:52:36 -07:00
committed by GitHub
parent 52d1a98f41
commit 469797478e

View File

@@ -2842,6 +2842,7 @@ extern "C" void Save_SaveGlobal(void) {
extern "C" void Save_LoadFile(void) {
// Handle vanilla context reset
OTRGlobals::Instance->gRandoContext->GetLogic()->SetContext(nullptr);
OTRGlobals::Instance->gRandoContext.reset();
OTRGlobals::Instance->gRandoContext = Rando::Context::CreateInstance();
OTRGlobals::Instance->gRandoContext->GetLogic()->SetSaveContext(&gSaveContext);