From bafb63df55c1006530d063b06f81efb9d14bd5a7 Mon Sep 17 00:00:00 2001 From: Gymnasiast Date: Thu, 30 Apr 2020 13:58:48 +0200 Subject: [PATCH] Add missing RIDE_TYPE_NULL check --- src/openrct2/interface/InteractiveConsole.cpp | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/src/openrct2/interface/InteractiveConsole.cpp b/src/openrct2/interface/InteractiveConsole.cpp index 29ec47519e..a23c4eee9d 100644 --- a/src/openrct2/interface/InteractiveConsole.cpp +++ b/src/openrct2/interface/InteractiveConsole.cpp @@ -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;