(svn r18816) -Fix (r18807): getting the catchment area of oilrigs triggered an assert

This commit is contained in:
yexo
2010-01-15 21:00:46 +00:00
parent 72572a0586
commit 31d1e9c051
2 changed files with 3 additions and 0 deletions

View File

@@ -63,6 +63,7 @@ struct AirportSpec {
static AirportSpec *Get(byte type)
{
if (type == AT_OILRIG) return &oilrig;
assert(type < NUM_AIRPORTS);
extern AirportSpec _origin_airport_specs[NUM_AIRPORTS];
return &_origin_airport_specs[type];
@@ -71,6 +72,7 @@ struct AirportSpec {
bool IsAvailable() const;
static AirportSpec dummy;
static AirportSpec oilrig;
};