File tree Expand file tree Collapse file tree 1 file changed +4
-4
lines changed
nav2_util/include/nav2_util Expand file tree Collapse file tree 1 file changed +4
-4
lines changed Original file line number Diff line number Diff line change @@ -244,7 +244,7 @@ class SimpleActionServer
244244 node_logging_interface_->get_logger (),
245245 " Action server failed while executing action callback: \" %s\" " , ex.what ());
246246 terminate_all ();
247- completion_callback_ ();
247+ if ( completion_callback_) { completion_callback_ ();}
248248 return ;
249249 }
250250
@@ -254,14 +254,14 @@ class SimpleActionServer
254254 if (stop_execution_) {
255255 warn_msg (" Stopping the thread per request." );
256256 terminate_all ();
257- completion_callback_ ();
257+ if ( completion_callback_) { completion_callback_ ();}
258258 break ;
259259 }
260260
261261 if (is_active (current_handle_)) {
262262 warn_msg (" Current goal was not completed successfully." );
263263 terminate (current_handle_);
264- completion_callback_ ();
264+ if ( completion_callback_) { completion_callback_ ();}
265265 }
266266
267267 if (is_active (pending_handle_)) {
@@ -314,7 +314,7 @@ class SimpleActionServer
314314 info_msg (" Waiting for async process to finish." );
315315 if (steady_clock::now () - start_time >= server_timeout_) {
316316 terminate_all ();
317- completion_callback_ ();
317+ if ( completion_callback_) { completion_callback_ ();}
318318 throw std::runtime_error (" Action callback is still running and missed deadline to stop" );
319319 }
320320 }
You can’t perform that action at this time.
0 commit comments