diff --git a/ChangeLog b/ChangeLog index b9743e8d..b5fcddd7 100644 --- a/ChangeLog +++ b/ChangeLog @@ -4,6 +4,10 @@ VERSION 0.8.1cvs 2005-12-04 Vincent Richard + * exception.{hpp|cpp}: fixed segfault in destructor when destroying + an exception chain with more than 2 elements (thanks to Bertrand + Benoit). + * posixChildProcess.cpp: fixed a bug in argument vector; last argument was not NULL (thanks to Bertrand Benoit). diff --git a/src/exception.cpp b/src/exception.cpp index 9cfd2201..b01fa033 100644 --- a/src/exception.cpp +++ b/src/exception.cpp @@ -46,6 +46,12 @@ exception::exception(const string& what, const exception& other) } +exception::exception(const exception& e) + : std::exception(), m_what(e.what()), m_other(e.m_other == NULL ? NULL : e.m_other->clone()) +{ +} + + exception::~exception() throw() { delete (m_other); diff --git a/vmime/exception.hpp b/vmime/exception.hpp index 04aa9d5a..7a394650 100644 --- a/vmime/exception.hpp +++ b/vmime/exception.hpp @@ -51,6 +51,8 @@ private: public: exception(const string& what, const exception& other = NO_EXCEPTION); + exception(const exception& e); + virtual ~exception() throw(); /** Return a description of the error.