Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion Generals/Code/GameEngine/Source/GameLogic/AI/AIPlayer.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1737,7 +1737,7 @@ void AIPlayer::buildBySupplies(Int minimumCash, const AsciiString& thingName)
{
Object *bestSupplyWarehouse = findSupplyCenter(minimumCash);
const ThingTemplate* tTemplate = TheThingFactory->findTemplate(thingName);
if (!tTemplate->isKindOf(KINDOF_CASH_GENERATOR)) {
if (tTemplate && !tTemplate->isKindOf(KINDOF_CASH_GENERATOR)) {
// Build by the current warehouse.
Object *curWarehouse = TheGameLogic->findObjectByID(m_curWarehouseID);
if (curWarehouse) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1857,7 +1857,7 @@ void AIPlayer::buildBySupplies(Int minimumCash, const AsciiString& thingName)
{
Object *bestSupplyWarehouse = findSupplyCenter(minimumCash);
const ThingTemplate* tTemplate = TheThingFactory->findTemplate(thingName);
if (!tTemplate->isKindOf(KINDOF_CASH_GENERATOR)) {
if (tTemplate && !tTemplate->isKindOf(KINDOF_CASH_GENERATOR)) {
// Build by the current warehouse.
Object *curWarehouse = TheGameLogic->findObjectByID(m_curWarehouseID);
if (curWarehouse) {
Expand Down
Loading