summaryrefslogtreecommitdiff
path: root/TAO/tao/CurrentC.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'TAO/tao/CurrentC.cpp')
-rw-r--r--TAO/tao/CurrentC.cpp4
1 files changed, 3 insertions, 1 deletions
diff --git a/TAO/tao/CurrentC.cpp b/TAO/tao/CurrentC.cpp
index 0860b6a260b..2105885d690 100644
--- a/TAO/tao/CurrentC.cpp
+++ b/TAO/tao/CurrentC.cpp
@@ -35,7 +35,9 @@ CORBA_Current_ptr CORBA_Current::_narrow (
|| obj->_servant()->_downcast ("IDL:CORBA/Current:1.0") == 0
)
{
- CORBA_Current_ptr new_obj = new CORBA_Current(obj->_stubobj ());
+ STUB_Object *stub = obj->_stubobj ();
+ stub->_incr_refcnt ();
+ CORBA_Current_ptr new_obj = new CORBA_Current(stub);
return new_obj;
} // end of if
STUB_Object *stub = obj->_servant ()->_create_stub (env);