Skip to content

Commit

Permalink
Add mutex for connections list in destructor
Browse files Browse the repository at this point in the history
Signed-off-by: Jose Luis Rivero <jrivero@osrfoundation.org>
  • Loading branch information
j-rivero committed Jul 29, 2021
1 parent 14ad930 commit 0096765
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions gazebo/common/Event.hh
Original file line number Diff line number Diff line change
Expand Up @@ -611,6 +611,7 @@ namespace gazebo
template<typename T>
EventT<T>::~EventT()
{
std::lock_guard<std::mutex> lock(this->mutex);
this->connections.clear();
}

Expand Down

0 comments on commit 0096765

Please sign in to comment.