From bb84c181f316126993a611973247f95485d8fbb8 Mon Sep 17 00:00:00 2001 From: Hielke Morsink Date: Tue, 30 Aug 2022 11:57:28 +0200 Subject: [PATCH] Fix crash on non-legacy objects --- src/openrct2/interface/InteractiveConsole.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/openrct2/interface/InteractiveConsole.cpp b/src/openrct2/interface/InteractiveConsole.cpp index 09a4c39019..dfbdc00815 100644 --- a/src/openrct2/interface/InteractiveConsole.cpp +++ b/src/openrct2/interface/InteractiveConsole.cpp @@ -1294,7 +1294,7 @@ static int32_t cc_object_count(InteractiveConsole& console, [[maybe_unused]] con int32_t entryGroupIndex = 0; for (; entryGroupIndex < object_entry_group_counts[EnumValue(objectType)]; entryGroupIndex++) { - if (object_entry_get_chunk(objectType, entryGroupIndex) == nullptr) + if (object_entry_get_object(objectType, entryGroupIndex) == nullptr) { break; }