Skip to content

Commit

Permalink
[fix] RobotState constructor segfault (#2790)
Browse files Browse the repository at this point in the history
  • Loading branch information
tylerjw committed Aug 15, 2021
1 parent 0defef0 commit 0b4ac7a
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion moveit_core/robot_state/src/robot_state.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -61,10 +61,16 @@ RobotState::RobotState(const RobotModelConstPtr& robot_model)
, has_velocity_(false)
, has_acceleration_(false)
, has_effort_(false)
, dirty_link_transforms_(robot_model_->getRootJoint())
, dirty_link_transforms_(nullptr)
, dirty_collision_body_transforms_(nullptr)
, rng_(nullptr)
{
if (robot_model == nullptr)
{
throw std::invalid_argument("RobotState cannot be constructed with nullptr RobotModelConstPtr");
}

dirty_link_transforms_ = robot_model_->getRootJoint();
allocMemory();
initTransforms();
}
Expand Down

0 comments on commit 0b4ac7a

Please sign in to comment.