Skip to content

Commit cd0e5e6

Browse files
fix linting problems Signed-off-by: suifengersan123 <[email protected]>
Signed-off-by: suifengersan123 <[email protected]>
1 parent d3deee2 commit cd0e5e6

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

nav2_dwb_controller/dwb_plugins/include/dwb_plugins/kinematic_parameters.hpp

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -147,8 +147,9 @@ class KinematicsHandler
147147

148148
inline KinematicParameters getKinematics() {
149149
KinematicParameters* ptr = kinematics_.load();
150+
// Check for nullptr before dereferencing
150151
if (ptr == nullptr) {
151-
throw std::runtime_error("KinematicsHandler::getKinematics() called before kinematics_ is initialized");
152+
throw std::runtime_error("Can't call KinematicsHandler::getKinematics()!");
152153
}
153154
return *ptr;
154155
}

0 commit comments

Comments
 (0)