mirror of
https://github.com/rosebudai/OpenRCT2-Web.git
synced 2026-12-05 12:45:14 +01:00
Protect against nullptr
This commit is contained in:
1 parent
749b07e83f
commit
300ce9727e
1 file changed
+4
-1
@@ -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