mirror of
https://github.com/vcmi/vcmi.git
synced 2024-12-24 22:14:36 +02:00
Fix possible crash on accessing faction description
This commit is contained in:
parent
2f4da1f124
commit
0aa7362adf
@ -466,7 +466,7 @@ void CInteractableTownTooltip::init(const CGTownInstance * town)
|
||||
if(town->id == townId && town->builtBuildings.count(BuildingID::TAVERN))
|
||||
LOCPLINT->showTavernWindow(town, nullptr, QueryID::NONE);
|
||||
}
|
||||
}, [&]{
|
||||
}, [town]{
|
||||
if(!town->town->faction->getDescriptionTranslated().empty())
|
||||
CRClickPopup::createAndPush(town->town->faction->getDescriptionTranslated());
|
||||
});
|
||||
|
@ -1351,7 +1351,7 @@ void CCastleInterface::recreateIcons()
|
||||
{
|
||||
if(town->builtBuildings.count(BuildingID::TAVERN))
|
||||
LOCPLINT->showTavernWindow(town, nullptr, QueryID::NONE);
|
||||
}, [&]{
|
||||
}, [this]{
|
||||
if(!town->town->faction->getDescriptionTranslated().empty())
|
||||
CRClickPopup::createAndPush(town->town->faction->getDescriptionTranslated());
|
||||
});
|
||||
|
Loading…
Reference in New Issue
Block a user