summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--src/core/Frontend.cpp4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/core/Frontend.cpp b/src/core/Frontend.cpp
index ec4e33ef..84a1e771 100644
--- a/src/core/Frontend.cpp
+++ b/src/core/Frontend.cpp
@@ -3653,7 +3653,9 @@ CMenuManager::LoadAllTextures()
#ifdef MENU_MAP
static bool menuOptionAdded = false;
for (int i = 0; i < ARRAY_SIZE(MapFilenames); i++) {
- if (!menuOptionAdded && RwTextureRead(MapFilenames[i][0], MapFilenames[i][1])) {
+ RwTexture *firstTile;
+ if (!menuOptionAdded && (firstTile = RwTextureRead(MapFilenames[i][0], MapFilenames[i][1]))) {
+ RwTextureDestroy(firstTile);
FrontendOptionSetCursor(MENUPAGE_PAUSE_MENU, 2, false);
FrontendOptionAddBuiltinAction("FEG_MAP", MENUACTION_CHANGEMENU, MENUPAGE_MAP, SAVESLOT_NONE);
menuOptionAdded = true;