Commit 3f62db3
committed
fix(ros2): move ROS2 unregistration before actor deregistration
Move ROS2 UnregisterSensor/UnregisterVehicle calls inside the
CarlaActor null check, before Registry.Deregister. This prevents
a potential null pointer dereference in multi-GPU setups where
CarlaActor may be null when OnActorDestroyed fires.
Also add "actor" prefix to auto-generated ROS names for clarity.
Port of ue4-dev commit 201d375.
Signed-off-by: Yutaka Kondo <yutaka.kondo@youtalk.jp>1 parent fee14f4 commit 3f62db3
File tree
1 file changed
+18
-17
lines changed- Unreal/CarlaUnreal/Plugins/Carla/Source/Carla/Actor
1 file changed
+18
-17
lines changedLines changed: 18 additions & 17 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
180 | 180 | | |
181 | 181 | | |
182 | 182 | | |
183 | | - | |
| 183 | + | |
184 | 184 | | |
185 | 185 | | |
186 | 186 | | |
| |||
231 | 231 | | |
232 | 232 | | |
233 | 233 | | |
234 | | - | |
| 234 | + | |
| 235 | + | |
| 236 | + | |
235 | 237 | | |
236 | | - | |
237 | | - | |
238 | | - | |
| 238 | + | |
239 | 239 | | |
240 | | - | |
241 | | - | |
242 | | - | |
243 | | - | |
244 | | - | |
245 | | - | |
246 | | - | |
247 | | - | |
248 | | - | |
| 240 | + | |
| 241 | + | |
| 242 | + | |
| 243 | + | |
| 244 | + | |
| 245 | + | |
| 246 | + | |
| 247 | + | |
| 248 | + | |
249 | 249 | | |
250 | | - | |
| 250 | + | |
| 251 | + | |
| 252 | + | |
251 | 253 | | |
252 | | - | |
| 254 | + | |
253 | 255 | | |
254 | 256 | | |
255 | | - | |
256 | 257 | | |
0 commit comments