summaryrefslogtreecommitdiff
path: root/TAO/tao/IIOP_Acceptor.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'TAO/tao/IIOP_Acceptor.cpp')
-rw-r--r--TAO/tao/IIOP_Acceptor.cpp4
1 files changed, 4 insertions, 0 deletions
diff --git a/TAO/tao/IIOP_Acceptor.cpp b/TAO/tao/IIOP_Acceptor.cpp
index 8aeb05d71b4..7f2e628ccce 100644
--- a/TAO/tao/IIOP_Acceptor.cpp
+++ b/TAO/tao/IIOP_Acceptor.cpp
@@ -124,6 +124,10 @@ TAO_IIOP_Acceptor::is_collocated (const TAO_Profile *pfile)
ACE_dynamic_cast (const TAO_IIOP_Profile *,
pfile);
+ // Make sure the dynamically cast pointer is valid.
+ if (profile == 0)
+ return 0;
+
for (size_t i = 0; i < this->num_hosts_; ++i)
{
// compare the port and sin_addr (numeric host address)