diff --git a/source/glest_game/ai/ai_rule.cpp b/source/glest_game/ai/ai_rule.cpp index 68394f33..22acec1f 100644 --- a/source/glest_game/ai/ai_rule.cpp +++ b/source/glest_game/ai/ai_rule.cpp @@ -113,7 +113,7 @@ bool AiRuleRepair::test(){ if(pt != NULL) { const UnitType *ut = dynamic_cast(pt); if( ut != NULL && ut->hasCommandClass(ccHarvest) == true && - ut->getStoredResourceCount() > 0) { + u->getType()->getStoredResourceCount() > 0) { unitCanProduceWorker = true; } }