* Add an assertion to check for NULL pointers (this seems to happen a lot when loading games lately)

git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@1835 4a71c877-e1ca-e34f-864e-861f7616d084
master
Giel van Schijndel 2007-06-06 22:47:22 +00:00
parent b6744218fb
commit 7ede8f9fa1
1 changed files with 1 additions and 0 deletions

View File

@ -1796,6 +1796,7 @@ STRUCTURE* buildStructure(STRUCTURE_STATS* pStructureType, UDWORD x, UDWORD y, U
if (pStructureType->type == REF_RESOURCE_EXTRACTOR)
{
FEATURE *psFeature = getTileFeature(map_coord(x), map_coord(y));
ASSERT(psFeature != NULL, "buildStructure: getTileFeature returned a NULL pointer");
if (psFeature->psStats->subType == FEAT_OIL_RESOURCE)
{