Added check in wheels setter

This commit is contained in:
Manish 2019-05-10 13:10:20 +02:00
parent f3d5c6486f
commit 722df11fa3
1 changed files with 1 additions and 0 deletions

View File

@ -192,6 +192,7 @@ void ACarlaWheeledVehicle::SetWheelsFrictionScale(TArray<float> &WheelsFrictionS
UWheeledVehicleMovementComponent4W *Vehicle4W = Cast<UWheeledVehicleMovementComponent4W>(
GetVehicleMovement());
check(Vehicle4W != nullptr);
check(Vehicle4W->Wheels.Num() == WheelsFrictionScale.Num());
for (int32 i = 0; i < Vehicle4W->Wheels.Num(); ++i)
{