Skip to content

Commit f59b2c2

Browse files
Fix dereference error of 'shared_secret_handle' (#6404)
Signed-off-by: Carlos Ferreira González <carlosferreira@eprosima.com>
1 parent bc2d38f commit f59b2c2

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

src/cpp/rtps/security/SecurityManager.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2970,7 +2970,7 @@ bool SecurityManager::discovered_reader(
29702970

29712971
if (local_writer != writer_handles_.end())
29722972
{
2973-
if (remote_participant_crypto_handle != nullptr)
2973+
if (remote_participant_crypto_handle != nullptr && shared_secret_handle != nullptr)
29742974
{
29752975
DatareaderCryptoHandle* remote_reader_handle =
29762976
crypto_plugin_->cryptokeyfactory()->register_matched_remote_datareader(
@@ -3330,7 +3330,7 @@ bool SecurityManager::discovered_writer(
33303330

33313331
if (local_reader != reader_handles_.end())
33323332
{
3333-
if (remote_participant_crypto_handle != nullptr)
3333+
if (remote_participant_crypto_handle != nullptr && shared_secret_handle != nullptr)
33343334
{
33353335
DatawriterCryptoHandle* remote_writer_handle =
33363336
crypto_plugin_->cryptokeyfactory()->register_matched_remote_datawriter(

0 commit comments

Comments
 (0)