summaryrefslogtreecommitdiff
path: root/TAO/tao/SHMIOP_Acceptor.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'TAO/tao/SHMIOP_Acceptor.cpp')
-rw-r--r--TAO/tao/SHMIOP_Acceptor.cpp4
1 files changed, 4 insertions, 0 deletions
diff --git a/TAO/tao/SHMIOP_Acceptor.cpp b/TAO/tao/SHMIOP_Acceptor.cpp
index 0a3dc351921..7fc649bb91a 100644
--- a/TAO/tao/SHMIOP_Acceptor.cpp
+++ b/TAO/tao/SHMIOP_Acceptor.cpp
@@ -121,6 +121,10 @@ TAO_SHMIOP_Acceptor::is_collocated (const TAO_Profile *pfile)
ACE_dynamic_cast(const TAO_SHMIOP_Profile *,
pfile);
+ // Make sure the dynamically cast pointer is valid.
+ if (profile == 0)
+ return 0;
+
// compare the port and sin_addr (numeric host address)
return this->address_.same_host (profile->object_addr ());
}