From bb3992e7dca11b673548c7b19f74bf2f39bb9198 Mon Sep 17 00:00:00 2001 From: sphericalice Date: Fri, 3 Jun 2022 15:12:58 +0100 Subject: [PATCH] Use TRY_FREE_AND_SET_NULL macro for sFlyMap --- src/region_map.c | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/src/region_map.c b/src/region_map.c index c346a45ec4..195d665925 100644 --- a/src/region_map.c +++ b/src/region_map.c @@ -2024,11 +2024,7 @@ static void CB_ExitFlyMap(void) { SetMainCallback2(CB2_ReturnToPartyMenuFromFlyMap); } - if (sFlyMap != NULL) - { - free(sFlyMap); - sFlyMap = NULL; - } + TRY_FREE_AND_SET_NULL(sFlyMap); FreeAllWindowBuffers(); } break;