Various BUGFIXes and UBFIXes

This commit is contained in:
ExpoSeed
2021-05-15 15:56:17 -05:00
parent ab8318cc79
commit 361fa594b3
10 changed files with 48 additions and 9 deletions

View File

@@ -4221,12 +4221,17 @@ static void Task_OpenMonPic(u8 taskId)
return;
break;
default:
#ifndef UBFIX
DestroyTask(taskId);
#endif
// UB: Should not use the task after it has been deleted.
if (gTasks[taskId].tIsSwapScreen == TRUE)
Swap_CreateMonSprite();
else
Select_CreateMonSprite();
#ifdef UBFIX
DestroyTask(taskId);
#endif
return;
}
task->tState++;