1
0
mirror of https://github.com/vcmi/vcmi.git synced 2024-11-24 08:32:34 +02:00

Fix crash in rmg

This commit is contained in:
nordsoft 2022-09-05 20:54:24 +04:00 committed by Andrii Danylchenko
parent f7bf1ad467
commit cf9314507b

View File

@ -46,7 +46,7 @@ void TownPlacer::init()
void TownPlacer::placeTowns(ObjectManager & manager)
{
if((zone.getType() == ETemplateZoneType::CPU_START) || (zone.getType() == ETemplateZoneType::PLAYER_START))
if(zone.getOwner() && ((zone.getType() == ETemplateZoneType::CPU_START) || (zone.getType() == ETemplateZoneType::PLAYER_START)))
{
//set zone types to player faction, generate main town
logGlobal->info("Preparing playing zone");