diff --git a/gazebo/common/Event.hh b/gazebo/common/Event.hh index 79544527a8..f0a62e06c7 100644 --- a/gazebo/common/Event.hh +++ b/gazebo/common/Event.hh @@ -611,6 +611,7 @@ namespace gazebo template EventT::~EventT() { + std::lock_guard lock(this->mutex); this->connections.clear(); }