diff options
author | parsons <parsons@ae88bc3d-4319-0410-8dbf-d08b4c9d3795> | 2003-05-09 15:45:58 +0000 |
---|---|---|
committer | parsons <parsons@ae88bc3d-4319-0410-8dbf-d08b4c9d3795> | 2003-05-09 15:45:58 +0000 |
commit | 8ab8bb33bd9bb38cf159ffdba2bdb1c89ae0bc21 (patch) | |
tree | 82b46796f1b878f25cfef099a45775731362058f | |
parent | 1ace327b51954c5ea9a4a8ce1d4e83f69f7dddc4 (diff) | |
download | ATCD-8ab8bb33bd9bb38cf159ffdba2bdb1c89ae0bc21.tar.gz |
ChangeLogTag: Fri May 9 10:42:37 2003 Jeff Parsons <j.parsons@vanderbilt.edu>
-rw-r--r-- | TAO/ChangeLog | 9 | ||||
-rw-r--r-- | TAO/tao/Any.cpp | 14 |
2 files changed, 17 insertions, 6 deletions
diff --git a/TAO/ChangeLog b/TAO/ChangeLog index f1c280ecdcb..949bc9a3d2b 100644 --- a/TAO/ChangeLog +++ b/TAO/ChangeLog @@ -1,3 +1,12 @@ +Fri May 9 10:42:37 2003 Jeff Parsons <j.parsons@vanderbilt.edu> + + * tao/Any.cpp: + + In Any_var assignment operator from Any_var, added a + check for a null rhs ptr_ member. Thanks to + Huang-Ming Huang <hh1@cs.wustl.edu> for discovering + the problem. + Fri May 9 08:32:16 2003 Chad Elliott <elliott_c@ociweb.com> * tests/ORT/ORT.mpc: diff --git a/TAO/tao/Any.cpp b/TAO/tao/Any.cpp index 46ac282d6c9..8fb3017e08e 100644 --- a/TAO/tao/Any.cpp +++ b/TAO/tao/Any.cpp @@ -563,14 +563,16 @@ CORBA::Any_var::operator= (CORBA::Any *p) CORBA::Any_var & CORBA::Any_var::operator= (const CORBA::Any_var &r) { - CORBA::Any_ptr tmp = 0; + delete this->ptr_; + this->ptr_ = 0; - ACE_NEW_RETURN (tmp, - CORBA::Any (*r.ptr_), - *this); + if (r.ptr_ != 0) + { + ACE_NEW_RETURN (this->ptr_, + CORBA::Any (*r.ptr_), + *this); + } - delete this->ptr_; - this->ptr_ = tmp; return *this; } |