[Menus] Don't load the default menu upon failure

This commit is contained in:
momo5502 2017-02-14 00:09:24 +01:00
parent a1374e59e0
commit 9377d12c07

View File

@ -217,17 +217,17 @@ namespace Components
if (menus.empty())
{
// Try loading the original menu, if we can't load our custom one
Game::menuDef_t* originalMenu = AssetHandler::FindOriginalAsset(Game::XAssetType::ASSET_TYPE_MENU, menudef->window.name).menu;
if (originalMenu)
{
menus.push_back(originalMenu);
}
else
{
// // Try loading the original menu, if we can't load our custom one
// Game::menuDef_t* originalMenu = AssetHandler::FindOriginalAsset(Game::XAssetType::ASSET_TYPE_MENU, menudef->window.name).menu;
//
// if (originalMenu)
// {
// menus.push_back(originalMenu);
// }
// else
// {
menus.push_back(menudef);
}
// }
}
return menus;