diff options
Diffstat (limited to 'lib/Utils/DebugDump.cpp')
-rw-r--r-- | lib/Utils/DebugDump.cpp | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/lib/Utils/DebugDump.cpp b/lib/Utils/DebugDump.cpp index 765b5146..b4c3ee49 100644 --- a/lib/Utils/DebugDump.cpp +++ b/lib/Utils/DebugDump.cpp @@ -68,6 +68,22 @@ CDebugDump::CDebugDump() : m_bLocked(false) {} +CDebugDump::~CDebugDump() +{ + /* Paranoia. In C++, destructor will abort() if it was called while unwinding + * the stack and it throws an exception. + */ + try + { + Close(); + m_sDebugDumpDir.clear(); + } + catch (...) + { + error_msg_and_die("Internal error"); + } +} + void CDebugDump::Open(const char *pDir) { if (m_bOpened) |