diff --git a/Unreal/CarlaUE4/Plugins/Carla/Source/Carla/Traffic/SpeedLimitComponent.cpp b/Unreal/CarlaUE4/Plugins/Carla/Source/Carla/Traffic/SpeedLimitComponent.cpp index 0e71c1c40..089dc913b 100644 --- a/Unreal/CarlaUE4/Plugins/Carla/Source/Carla/Traffic/SpeedLimitComponent.cpp +++ b/Unreal/CarlaUE4/Plugins/Carla/Source/Carla/Traffic/SpeedLimitComponent.cpp @@ -83,7 +83,7 @@ void USpeedLimitComponent::OnOverlapBeginSpeedLimitBox(UPrimitiveComponent *Over const FHitResult &SweepResult) { ACarlaWheeledVehicle* Vehicle = Cast(OtherActor); - if (OtherActor) + if (Vehicle) { auto Controller = Cast(Vehicle->GetController()); if (Controller)