Skip to content

Commit

Permalink
Fix crash when multicopter motor system is attached to an empty model (
Browse files Browse the repository at this point in the history
…#2653)

Signed-off-by: Ian Chen <[email protected]>
  • Loading branch information
iche033 authored Oct 16, 2024
1 parent 5565815 commit 990f1c2
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/systems/multicopter_motor_model/MulticopterMotorModel.cc
Original file line number Diff line number Diff line change
Expand Up @@ -411,7 +411,8 @@ void MulticopterMotorModel::PreUpdate(const UpdateInfo &_info,

const auto parentLinkName = _ecm.Component<components::ParentLinkName>(
this->dataPtr->jointEntity);
this->dataPtr->parentLinkName = parentLinkName->Data();
if (parentLinkName)
this->dataPtr->parentLinkName = parentLinkName->Data();
}

if (this->dataPtr->linkEntity == kNullEntity)
Expand Down

0 comments on commit 990f1c2

Please sign in to comment.