summaryrefslogtreecommitdiff
path: root/mm/src/code
diff options
context:
space:
mode:
Diffstat (limited to 'mm/src/code')
-rw-r--r--mm/src/code/z_play.c8
1 files changed, 5 insertions, 3 deletions
diff --git a/mm/src/code/z_play.c b/mm/src/code/z_play.c
index a939ed217..c9b3a1796 100644
--- a/mm/src/code/z_play.c
+++ b/mm/src/code/z_play.c
@@ -2184,9 +2184,6 @@ void Play_FillScreen(GameState* thisx, s16 fillScreenOn, u8 red, u8 green, u8 bl
void Play_Init(GameState* thisx) {
PlayState* this = (PlayState*)thisx;
- // #region 2S2H [General] Making gPlayState available
- gPlayState = this;
- // #endregion
GraphicsContext* gfxCtx = this->state.gfxCtx;
s32 pad;
uintptr_t zAlloc;
@@ -2220,6 +2217,11 @@ void Play_Init(GameState* thisx) {
return;
}
+ // #region 2S2H [General] Making gPlayState available
+ // Setting after the early returns, so that Play_Destroy is registered to unset the ptr later
+ gPlayState = this;
+ // #endregion
+
if ((gSaveContext.nextCutsceneIndex == 0xFFEF) || (gSaveContext.nextCutsceneIndex == 0xFFF0)) {
scene = ((void)0, gSaveContext.save.entrance) >> 9;
spawn = (((void)0, gSaveContext.save.entrance) >> 4) & 0x1F;