Add a check if deliveryPointToMove == NULL in the blueprint code and ASSERT.

master
Gerard Krol 2009-03-17 02:51:03 +01:00
parent e06f58695e
commit a3b1bbf2c7
1 changed files with 9 additions and 5 deletions

View File

@ -1397,11 +1397,15 @@ void displayBlueprints(void)
else
{
// it's a delivery point
FLAG_POSITION pos = *deliveryPointToMove;
pos.coords.x = world_coord(sBuildDetails.x)+world_coord(1)/2;
pos.coords.y = world_coord(sBuildDetails.y)+world_coord(1)/2;
pos.coords.z = map_Height(pos.coords.x, pos.coords.y) + world_coord(1)/8;
renderDeliveryPoint(&pos, true);
ASSERT(deliveryPointToMove, "we are placing something, but it is not a building or a delivery point");
if (deliveryPointToMove)
{
FLAG_POSITION pos = *deliveryPointToMove;
pos.coords.x = world_coord(sBuildDetails.x)+world_coord(1)/2;
pos.coords.y = world_coord(sBuildDetails.y)+world_coord(1)/2;
pos.coords.z = map_Height(pos.coords.x, pos.coords.y) + world_coord(1)/8;
renderDeliveryPoint(&pos, true);
}
}
}