Use the FREE_AND_SET_NULL macro where appropriate
This commit is contained in:
@@ -816,8 +816,7 @@ static void Task_EvolutionScene(u8 taskId)
|
||||
|
||||
DestroyTask(taskId);
|
||||
FreeMonSpritesGfx();
|
||||
Free(sEvoStructPtr);
|
||||
sEvoStructPtr = NULL;
|
||||
FREE_AND_SET_NULL(sEvoStructPtr);
|
||||
FreeAllWindowBuffers();
|
||||
SetMainCallback2(gCB2_AfterEvolution);
|
||||
}
|
||||
@@ -1223,8 +1222,7 @@ static void Task_TradeEvolutionScene(u8 taskId)
|
||||
if (!IsTextPrinterActive(0))
|
||||
{
|
||||
DestroyTask(taskId);
|
||||
Free(sEvoStructPtr);
|
||||
sEvoStructPtr = NULL;
|
||||
FREE_AND_SET_NULL(sEvoStructPtr);
|
||||
gTextFlags.useAlternateDownArrow = 0;
|
||||
SetMainCallback2(gCB2_AfterEvolution);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user