From ab933f250e3fd89d3964631dd1dae38eedd34ad0 Mon Sep 17 00:00:00 2001 From: MysterD Date: Wed, 13 Apr 2022 01:29:41 -0700 Subject: [PATCH] Fixed crash when pausing in unexpected courses/acts --- src/game/ingame_menu.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/game/ingame_menu.c b/src/game/ingame_menu.c index dfead183..b122b42d 100644 --- a/src/game/ingame_menu.c +++ b/src/game/ingame_menu.c @@ -2369,6 +2369,10 @@ u8 gTextCourseArr[][7] = { #endif void render_pause_my_score_coins(void) { + // sanity check + if (!COURSE_IS_VALID_COURSE(gCurrCourseNum)) { return; } + if (gCurrActNum <= 0 || gCurrActNum > 6) { return; } + #ifdef VERSION_EU u8 textMyScore[][10] = { { TEXT_MY_SCORE },