diff options
-rw-r--r-- | TAO/ChangeLogs/ChangeLog-02a | 11 | ||||
-rw-r--r-- | TAO/tao/PortableServer/Servant_Base.cpp | 7 |
2 files changed, 15 insertions, 3 deletions
diff --git a/TAO/ChangeLogs/ChangeLog-02a b/TAO/ChangeLogs/ChangeLog-02a index 682a1aedaec..304e343de22 100644 --- a/TAO/ChangeLogs/ChangeLog-02a +++ b/TAO/ChangeLogs/ChangeLog-02a @@ -1,3 +1,14 @@ +Fri Feb 9 11:38:06 2001 Carlos O'Ryan <coryan@uci.edu> + + * tao/PortableServer/Servant_Base.cpp: + Fixed problem with expressions like: + + PortableServer::ServantBase_var foo = ...; + foo = foo.in (); + + they used to crash. Thanks to Jody Hagins <jody@atdesk.com> for + pointing this out. + Fri Feb 9 11:35:17 2001 Carlos O'Ryan <coryan@uci.edu> * orbsvcs/tests/Interoperable_Naming/client.cpp: diff --git a/TAO/tao/PortableServer/Servant_Base.cpp b/TAO/tao/PortableServer/Servant_Base.cpp index 06ed32203bc..ee9bd0e96b1 100644 --- a/TAO/tao/PortableServer/Servant_Base.cpp +++ b/TAO/tao/PortableServer/Servant_Base.cpp @@ -325,10 +325,11 @@ TAO_ServantBase_var::~TAO_ServantBase_var (void) TAO_ServantBase_var & TAO_ServantBase_var::operator= (TAO_ServantBase *p) { + if (this->ptr_ == p) + return *this; + if (this->ptr_ != 0) - { - this->ptr_->_remove_ref (); - } + this->ptr_->_remove_ref (); this->ptr_ = p; |