mirror of
https://github.com/OpenRCT2/OpenRCT2
synced 2026-01-15 11:03:00 +01:00
Protect against nullptr
This commit is contained in:
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user