From 469797478e3c8ae3028d6ee78fdd36831badcb05 Mon Sep 17 00:00:00 2001 From: Malkierian Date: Wed, 16 Oct 2024 20:52:36 -0700 Subject: [PATCH] Force global rando context's Logic child to release its parent Context reference. (#4429) --- soh/soh/SaveManager.cpp | 1 + 1 file changed, 1 insertion(+) diff --git a/soh/soh/SaveManager.cpp b/soh/soh/SaveManager.cpp index cef3149e2..9f9255a52 100644 --- a/soh/soh/SaveManager.cpp +++ b/soh/soh/SaveManager.cpp @@ -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);