Add some additional checks to unit production functions.

Patch by Buginator.

git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@4175 4a71c877-e1ca-e34f-864e-861f7616d084
master
Roman C 2008-03-20 18:29:16 +00:00
parent 04cf4c0260
commit 279230ca8c
1 changed files with 2 additions and 0 deletions

View File

@ -6926,6 +6926,7 @@ UDWORD getProductionQuantity(STRUCTURE *psStructure, DROID_TEMPLATE *psTemplate)
UDWORD inc, factoryType, factoryInc;
FACTORY *psFactory;
if (psStructure == NULL) return 0;
if (psStructure->player == productionPlayer)
{
psFactory = &psStructure->pFunctionality->factory;
@ -6954,6 +6955,7 @@ UDWORD getProductionBuilt(STRUCTURE *psStructure, DROID_TEMPLATE *psTemplate)
UDWORD inc, factoryType, factoryInc;
FACTORY *psFactory;
if (psStructure == NULL) return 0;
if (psStructure->player == productionPlayer)
{
psFactory = &psStructure->pFunctionality->factory;