Skip to content

Commit

Permalink
Hotfix to fix segfault in DefaultStateClient (#289)
Browse files Browse the repository at this point in the history
  • Loading branch information
jschornak-bdai authored Feb 29, 2024
1 parent 0f1a4cc commit 19dc090
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion spot_driver/src/api/default_state_client.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ namespace spot_ros2 {
DefaultStateClient::DefaultStateClient(::bosdyn::client::RobotStateClient* client) : client_{client} {}

tl::expected<bosdyn::api::RobotState, std::string> DefaultStateClient::getRobotState() {
const auto& get_robot_state_result = client_->GetRobotStateAsync().get();
const auto get_robot_state_result = client_->GetRobotStateAsync().get();
if (!get_robot_state_result.status || !get_robot_state_result.response.has_robot_state()) {
return tl::make_unexpected("Failed to get robot state: " + get_robot_state_result.status.DebugString());
}
Expand Down

0 comments on commit 19dc090

Please sign in to comment.