|
|
@@ -110,7 +110,11 @@ void CBuilding::addNewBonus(const std::shared_ptr<Bonus> & b, BonusList & bonusL
|
|
|
|
|
|
CFaction::~CFaction()
|
|
|
{
|
|
|
- delete town;
|
|
|
+ if (town)
|
|
|
+ {
|
|
|
+ delete town;
|
|
|
+ town = nullptr;
|
|
|
+ }
|
|
|
}
|
|
|
|
|
|
int32_t CFaction::getIndex() const
|
|
|
@@ -1029,7 +1033,7 @@ CFaction * CTownHandler::loadFromJson(const std::string & scope, const JsonNode
|
|
|
faction->creatureBg120 = source["creatureBackground"]["120px"].String();
|
|
|
faction->creatureBg130 = source["creatureBackground"]["130px"].String();
|
|
|
|
|
|
- faction->boatType = EBoatId::NONE;
|
|
|
+ faction->boatType = EBoatId::CASTLE; //Do not crash
|
|
|
if (!source["boat"].isNull())
|
|
|
{
|
|
|
VLC->modh->identifiers.requestIdentifier("core:boat", source["boat"], [=](int32_t boatTypeID)
|