mirror of
https://github.com/halpz/re3.git
synced 2024-12-22 17:35:29 +00:00
Fix map texture leak
This commit is contained in:
parent
4819d195d8
commit
a923728877
|
@ -3653,7 +3653,9 @@ CMenuManager::LoadAllTextures()
|
||||||
#ifdef MENU_MAP
|
#ifdef MENU_MAP
|
||||||
static bool menuOptionAdded = false;
|
static bool menuOptionAdded = false;
|
||||||
for (int i = 0; i < ARRAY_SIZE(MapFilenames); i++) {
|
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);
|
FrontendOptionSetCursor(MENUPAGE_PAUSE_MENU, 2, false);
|
||||||
FrontendOptionAddBuiltinAction("FEG_MAP", MENUACTION_CHANGEMENU, MENUPAGE_MAP, SAVESLOT_NONE);
|
FrontendOptionAddBuiltinAction("FEG_MAP", MENUACTION_CHANGEMENU, MENUPAGE_MAP, SAVESLOT_NONE);
|
||||||
menuOptionAdded = true;
|
menuOptionAdded = true;
|
||||||
|
|
Loading…
Reference in a new issue