diff options
Diffstat (limited to 'TAO/tao/CurrentC.cpp')
-rw-r--r-- | TAO/tao/CurrentC.cpp | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/TAO/tao/CurrentC.cpp b/TAO/tao/CurrentC.cpp index 174adacca8f..07ec728e875 100644 --- a/TAO/tao/CurrentC.cpp +++ b/TAO/tao/CurrentC.cpp @@ -101,10 +101,15 @@ CORBA::Current::_narrow ( ACE_ENV_ARG_DECL_NOT_USED ) { + if (CORBA::is_nil (_tao_objref)) + { + return Current::_nil (); + } + Current_ptr proxy = dynamic_cast<Current_ptr> (_tao_objref); - proxy->_add_ref (); - return proxy; + + return Current::_duplicate (proxy); } CORBA::Current_ptr |