diff --git a/src/cpp/rtps/builtin/discovery/participant/PDP.cpp b/src/cpp/rtps/builtin/discovery/participant/PDP.cpp index ba3a3c40b49..df11e9fbc2f 100644 --- a/src/cpp/rtps/builtin/discovery/participant/PDP.cpp +++ b/src/cpp/rtps/builtin/discovery/participant/PDP.cpp @@ -313,7 +313,11 @@ bool PDP::initPDP( } //UPDATE METATRAFFIC. mp_builtin->updateMetatrafficLocators(this->mp_PDPReader->getAttributes().unicastLocatorList); + + mp_mutex->lock(); ParticipantProxyData* pdata = add_participant_proxy_data(part->getGuid(), true); + mp_mutex->unlock(); + if (pdata == nullptr) { return false;