From 07828ab335f0aef682f0161d6dc5f3c92d271a90 Mon Sep 17 00:00:00 2001 From: Trevor Standley Date: Tue, 4 Aug 2009 09:40:57 +0000 Subject: [PATCH] --- AI/GeniusAI/CGeniusAI.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/AI/GeniusAI/CGeniusAI.cpp b/AI/GeniusAI/CGeniusAI.cpp index 8badbc2ce..e571a8662 100644 --- a/AI/GeniusAI/CGeniusAI.cpp +++ b/AI/GeniusAI/CGeniusAI.cpp @@ -111,7 +111,7 @@ void CGeniusAI::addTownObjectives(HypotheticalGameState::TownModel &t, Hypotheti if(!t.visitingHero) { for(int i =0; i < hgs.AvailableHeroesToBuy.size();i++) - if(hgs.AvailableHeroesToBuy[i]->army.slots.size()>1)//only buy heros with units + if(hgs.AvailableHeroesToBuy[i]!=NULL&&hgs.AvailableHeroesToBuy[i]->army.slots.size()>1)//only buy heros with units { TownObjective to(AIObjective::recruitHero,&t,0); currentTownObjectives.insert(to); @@ -244,7 +244,7 @@ void CGeniusAI::yourTurn() tileRevealed(int3(x,y,z)); /////////////////////////////////////////////////////////////////////////////////// -// reportResources(); + reportResources(); turn++; AIObjective * objective;