From fba921c03ae1e79170a1f26cbeb4360d6aa08499 Mon Sep 17 00:00:00 2001 From: Feej <33738007+yc-feej@users.noreply.github.com> Date: Fri, 17 Mar 2023 19:07:09 +0800 Subject: [PATCH] Bugfix: Pixel data not set correctly will crash when saving pixels to disk (#6235) --- CHANGELOG.md | 1 + .../CarlaUE4/Plugins/Carla/Source/Carla/Sensor/PixelReader.cpp | 1 + 2 files changed, 2 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 98ac4876f..3cf903017 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -11,6 +11,7 @@ * `start_replaying.py` using flag `--move-spectator` * Added maps, vehicles, pedestrians and props catalogues to the documentation * Add keyword arguments for `carla.TrafficManager` Python API functions + * Fixed bug causing the `FPixelReader::SavePixelsToDisk(PixelData, FilePath)` function to crash due to pixel array not set correctly. ## CARLA 0.9.14 diff --git a/Unreal/CarlaUE4/Plugins/Carla/Source/Carla/Sensor/PixelReader.cpp b/Unreal/CarlaUE4/Plugins/Carla/Source/Carla/Sensor/PixelReader.cpp index 7da6424b4..c1552ef34 100644 --- a/Unreal/CarlaUE4/Plugins/Carla/Source/Carla/Sensor/PixelReader.cpp +++ b/Unreal/CarlaUE4/Plugins/Carla/Source/Carla/Sensor/PixelReader.cpp @@ -104,6 +104,7 @@ TUniquePtr> FPixelReader::DumpPixels( { return nullptr; } + PixelData->Pixels = Pixels; return PixelData; }