diff --git a/src/structure.c b/src/structure.c index ded148bc7..e90994e87 100644 --- a/src/structure.c +++ b/src/structure.c @@ -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;