From 8965838265f67f962ab29e9ca83c40127dff6c25 Mon Sep 17 00:00:00 2001 From: Ian Chen Date: Tue, 15 Oct 2024 22:19:22 +0000 Subject: [PATCH] fix multicopter crash Signed-off-by: Ian Chen --- src/systems/multicopter_motor_model/MulticopterMotorModel.cc | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/systems/multicopter_motor_model/MulticopterMotorModel.cc b/src/systems/multicopter_motor_model/MulticopterMotorModel.cc index 5a711272bd..02fa87b774 100644 --- a/src/systems/multicopter_motor_model/MulticopterMotorModel.cc +++ b/src/systems/multicopter_motor_model/MulticopterMotorModel.cc @@ -411,7 +411,8 @@ void MulticopterMotorModel::PreUpdate(const UpdateInfo &_info, const auto parentLinkName = _ecm.Component( this->dataPtr->jointEntity); - this->dataPtr->parentLinkName = parentLinkName->Data(); + if (parentLinkName) + this->dataPtr->parentLinkName = parentLinkName->Data(); } if (this->dataPtr->linkEntity == kNullEntity)