Add missing RIDE_TYPE_NULL check

This commit is contained in:
Gymnasiast 2020-04-30 13:58:48 +02:00
parent ba66751d35
commit bafb63df55
No known key found for this signature in database
GPG Key ID: DBFFF47AB2CA3EDD
1 changed files with 5 additions and 2 deletions

View File

@ -1094,8 +1094,11 @@ static int32_t cc_load_object(InteractiveConsole& console, const arguments_t& ar
for (int32_t j = 0; j < MAX_RIDE_TYPES_PER_RIDE_ENTRY; j++)
{
rideType = rideEntry->ride_type[j];
uint8_t category = RideTypeDescriptors[rideType].Category;
research_insert_ride_entry(rideType, groupIndex, category, true);
if (rideType != RIDE_TYPE_NULL)
{
uint8_t category = RideTypeDescriptors[rideType].Category;
research_insert_ride_entry(rideType, groupIndex, category, true);
}
}
gSilentResearch = true;