summaryrefslogtreecommitdiff
path: root/TAO/tests/RTCORBA/Server_Protocol/server.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'TAO/tests/RTCORBA/Server_Protocol/server.cpp')
-rw-r--r--TAO/tests/RTCORBA/Server_Protocol/server.cpp11
1 files changed, 9 insertions, 2 deletions
diff --git a/TAO/tests/RTCORBA/Server_Protocol/server.cpp b/TAO/tests/RTCORBA/Server_Protocol/server.cpp
index 191335f0046..38caffc61f5 100644
--- a/TAO/tests/RTCORBA/Server_Protocol/server.cpp
+++ b/TAO/tests/RTCORBA/Server_Protocol/server.cpp
@@ -167,7 +167,9 @@ check_default_server_protocol (CORBA::ORB_ptr orb,
int
main (int argc, char *argv[])
{
- ACE_TRY_NEW_ENV
+ ACE_DECLARE_NEW_CORBA_ENV;
+
+ ACE_TRY
{
CORBA::ORB_var orb =
CORBA::ORB_init (argc, argv, "", ACE_TRY_ENV);
@@ -179,10 +181,16 @@ main (int argc, char *argv[])
CORBA::Object_var object =
orb->resolve_initial_references("RootPOA", ACE_TRY_ENV);
ACE_TRY_CHECK;
+
PortableServer::POA_var root_poa =
PortableServer::POA::_narrow (object.in (), ACE_TRY_ENV);
ACE_TRY_CHECK;
+ if (CORBA::is_nil (root_poa))
+ ACE_ERROR_RETURN ((LM_ERROR,
+ "ERROR: Panic <RootPOA> is nil\n"),
+ -1);
+
PortableServer::POAManager_var poa_manager =
root_poa->the_POAManager (ACE_TRY_ENV);
ACE_TRY_CHECK;
@@ -287,4 +295,3 @@ main (int argc, char *argv[])
return 0;
}
-