mirror of
https://github.com/vcmi/vcmi.git
synced 2025-11-23 22:37:55 +02:00
Fix crash on exporting maps for translation
This commit is contained in:
@@ -254,9 +254,16 @@ void ClientCommandManager::handleTranslateMapsCommand()
|
||||
logGlobal->info("Loading campaigns for export");
|
||||
for (auto const & campaignName : campaignList)
|
||||
{
|
||||
loadedCampaigns.push_back(CampaignHandler::getCampaign(campaignName.getName()));
|
||||
for (auto const & part : loadedCampaigns.back()->allScenarios())
|
||||
loadedCampaigns.back()->getMap(part, nullptr);
|
||||
try
|
||||
{
|
||||
loadedCampaigns.push_back(CampaignHandler::getCampaign(campaignName.getName()));
|
||||
for (auto const & part : loadedCampaigns.back()->allScenarios())
|
||||
loadedCampaigns.back()->getMap(part, nullptr);
|
||||
}
|
||||
catch(std::exception & e)
|
||||
{
|
||||
logGlobal->warn("Campaign %s is invalid. Message: %s", campaignName.getName(), e.what());
|
||||
}
|
||||
}
|
||||
|
||||
std::map<std::string, std::map<std::string, std::string>> textsByMod;
|
||||
|
||||
Reference in New Issue
Block a user