summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorerorcun <erorcunerorcun@hotmail.com.tr>2021-06-26 23:34:46 +0200
committererorcun <erorcunerorcun@hotmail.com.tr>2021-06-26 23:34:46 +0200
commita92372887766aeb5fe0908d5ae6a221f1c19af30 (patch)
treedc20948447c912bb35c80e61eb66e19159fedc6d /src
parentfix WriteSaveHeader (diff)
downloadre3-a92372887766aeb5fe0908d5ae6a221f1c19af30.tar
re3-a92372887766aeb5fe0908d5ae6a221f1c19af30.tar.gz
re3-a92372887766aeb5fe0908d5ae6a221f1c19af30.tar.bz2
re3-a92372887766aeb5fe0908d5ae6a221f1c19af30.tar.lz
re3-a92372887766aeb5fe0908d5ae6a221f1c19af30.tar.xz
re3-a92372887766aeb5fe0908d5ae6a221f1c19af30.tar.zst
re3-a92372887766aeb5fe0908d5ae6a221f1c19af30.zip
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;