Skip to content

Commit

Permalink
Update nav2_costmap_2d/include/nav2_costmap_2d/costmap_2d_ros.hpp
Browse files Browse the repository at this point in the history
Co-authored-by: Steve Macenski <[email protected]>
  • Loading branch information
GoesM and SteveMacenski authored Nov 16, 2023
1 parent e4e5e97 commit bf95177
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion nav2_costmap_2d/include/nav2_costmap_2d/costmap_2d_ros.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -171,7 +171,7 @@ class Costmap2DROS : public nav2_util::LifecycleNode
{
//lock because no ptr-access is allowed until other ptr-free finished
std::unique_lock<Costmap2D::mutex_t> lock(*access_);
if (layered_costmap_ == nullptr) {
if (!layered_costmap_) {
return false; // to avoid nullptr accessed
}
return layered_costmap_->isCurrent();
Expand Down

0 comments on commit bf95177

Please sign in to comment.