mirror of
https://github.com/OpenRCT2/OpenRCT2
synced 2026-01-06 06:32:56 +01:00
Fix #14412: NPE in vehicle_create_car()
This commit is contained in:
committed by
GitHub
parent
7c33a31d3a
commit
cbefc4fe38
@@ -4084,6 +4084,9 @@ static Vehicle* vehicle_create_car(
|
||||
ride_id_t rideIndex, int32_t vehicleEntryIndex, int32_t carIndex, int32_t vehicleIndex, const CoordsXYZ& carPosition,
|
||||
int32_t* remainingDistance, TrackElement* trackElement)
|
||||
{
|
||||
if (trackElement == nullptr)
|
||||
return nullptr;
|
||||
|
||||
auto ride = get_ride(rideIndex);
|
||||
if (ride == nullptr)
|
||||
return nullptr;
|
||||
|
||||
Reference in New Issue
Block a user