Skip to content

Commit 79e8b5d

Browse files
KoloInDaCribHundrec
authored andcommitted
fix: Prevent crashing by replacing the state constructor if needed
1 parent 6e954cf commit 79e8b5d

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

source/funkin/ui/freeplay/FreeplayState.hx

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -353,6 +353,14 @@ class FreeplayState extends MusicBeatSubState
353353
stickerSubState.degenStickers();
354354
}
355355

356+
if (fromResultsParams != null)
357+
{
358+
@:privateAccess
359+
this._parentState._constructor = () -> {
360+
return FreeplayState.build(null, null);
361+
}
362+
}
363+
356364
#if FEATURE_DISCORD_RPC
357365
// Updating Discord Rich Presence
358366
DiscordClient.instance.setPresence({state: 'In the Menus', details: null});

0 commit comments

Comments
 (0)