1
0
mirror of https://github.com/OpenRCT2/OpenRCT2 synced 2026-01-15 11:03:00 +01:00

Protect against nullptr

This commit is contained in:
Ted John
2019-07-21 14:26:17 +01:00
parent 749b07e83f
commit 300ce9727e

View File

@@ -7936,7 +7936,10 @@ size_t Ride::FormatNameTo(void* argsV) const
if (rideEntry != nullptr)
{
auto rideGroup = RideGroupManager::GetRideGroup(type, rideEntry);
rideTypeName = rideGroup->Naming.name;
if (rideGroup != nullptr)
{
rideTypeName = rideGroup->Naming.name;
}
}
}
set_format_arg_on(args, 0, rct_string_id, 1);