From e95f8fde77a7e5951b742db0ea50de4d6f1118ff Mon Sep 17 00:00:00 2001 From: Vadim Zeitlin Date: Sat, 27 Apr 2002 22:37:28 +0000 Subject: [PATCH] really fixed memory leak in wxLogChain git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@15289 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- src/common/log.cpp | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/common/log.cpp b/src/common/log.cpp index 4c58a331e2..9a182465b8 100644 --- a/src/common/log.cpp +++ b/src/common/log.cpp @@ -770,7 +770,10 @@ wxLogChain::wxLogChain(wxLog *logger) wxLogChain::~wxLogChain() { - delete m_logNew; + delete m_logOld; + + if ( m_logNew != this ) + delete m_logNew; } void wxLogChain::SetLog(wxLog *logger)