Fix invalid mario surface pointer on act select

This commit is contained in:
Agent X 2024-12-24 18:50:55 -05:00
parent 9282f21f24
commit ef2112759e

View file

@ -401,6 +401,11 @@ static void level_cmd_alloc_level_pool(void) {
static void level_cmd_free_level_pool(void) {
s32 i;
// these pointers would be invalid on the act selector menu
gMarioStates[0].wall = NULL;
gMarioStates[0].ceil = NULL;
gMarioStates[0].floor = NULL;
if (!sFinishedLoadingPerm) {
sFinishedLoadingPerm = true;
// make sure we don't free the pool with the permanent models