Skip to content

Fix crash in ConvertScenarioTrajectoryRef

A crash is caused when running a scenario with FollowTrajectoryAction using a CatalogReference. The issue was with ConvertScenarioTrajectory, since it was checking whether ITrajectoryRef existed rather than which payload it actually contained (ITrajectory or ICatalogReference), causing it to return null trajectory and subsequently crash on GetShape() when a CatalogReference is used instead of Trajectory.

This PR adds IsSetTrajectory() and IsSetCatalogReference() checks to properly resolve the trajectory from either source, includes null-pointer validation, and provides test coverage for both ITrajectory and ICatalogReference resolution paths.

Edited by Pedro Henriques

Merge request reports

Loading