diff --git a/Unreal/CarlaUE4/Plugins/Carla/Source/Carla/Recorder/CarlaRecorderAnimVehicleWheels.cpp b/Unreal/CarlaUE4/Plugins/Carla/Source/Carla/Recorder/CarlaRecorderAnimVehicleWheels.cpp index a79162061..4cb890ca5 100644 --- a/Unreal/CarlaUE4/Plugins/Carla/Source/Carla/Recorder/CarlaRecorderAnimVehicleWheels.cpp +++ b/Unreal/CarlaUE4/Plugins/Carla/Source/Carla/Recorder/CarlaRecorderAnimVehicleWheels.cpp @@ -37,12 +37,12 @@ void CarlaRecorderAnimWheels::Read(std::istream &InFile) ReadValue(InFile, DatabaseId); uint32_t NumWheels = 0; ReadValue(InFile, NumWheels); - WheelValues.reserve(NumWheels); + WheelValues.resize(NumWheels); for (size_t i = 0; i < NumWheels; ++i) { WheelInfo Wheel; Wheel.Read(InFile); - WheelValues.push_back(Wheel); + WheelValues[i] = Wheel; } }