Skip to content

Commit

Permalink
(fix) Minor fix to check for action server creation before destruction
Browse files Browse the repository at this point in the history
  • Loading branch information
mkabtoul committed Feb 11, 2025
1 parent 45b24d2 commit 57d6bb3
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion ros_sugar/core/component.py
Original file line number Diff line number Diff line change
Expand Up @@ -604,7 +604,7 @@ def destroy_all_action_servers(self):
Destroys all action servers
"""
# Destroy node main Server if runtype is action server
if self.run_type == ComponentRunType.ACTION_SERVER:
if self.run_type == ComponentRunType.ACTION_SERVER and hasattr(self, "action_server"):
self.action_server.destroy()

def destroy_all_action_clients(self):
Expand Down

0 comments on commit 57d6bb3

Please sign in to comment.