Skip to content

Commit

Permalink
get_node() throw if node is uninitialized (ros-controls#268)
Browse files Browse the repository at this point in the history
  • Loading branch information
bmagyar authored Dec 14, 2020
1 parent 792c24d commit 1649eef
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions controller_interface/src/controller_interface.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -144,6 +144,9 @@ void ControllerInterface::release_interfaces()
std::shared_ptr<rclcpp::Node>
ControllerInterface::get_node()
{
if (!node_.get()) {
throw std::runtime_error("Node hasn't been initialized yet!");
}
return node_;
}

Expand Down

0 comments on commit 1649eef

Please sign in to comment.