From 2cb8fef483849ad7b2906e110cfc6516ea43bb9e Mon Sep 17 00:00:00 2001 From: Vincent Richard Date: Mon, 5 Dec 2005 17:35:51 +0000 Subject: Fixed segfault in destructor when chaining 3 exceptions or more. --- src/exception.cpp | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'src/exception.cpp') 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); -- cgit v1.2.3