]> git.saurik.com Git - wxWidgets.git/commitdiff
really fixed memory leak in wxLogChain
authorVadim Zeitlin <vadim@wxwidgets.org>
Sat, 27 Apr 2002 22:37:28 +0000 (22:37 +0000)
committerVadim Zeitlin <vadim@wxwidgets.org>
Sat, 27 Apr 2002 22:37:28 +0000 (22:37 +0000)
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@15289 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775

src/common/log.cpp

index 4c58a331e24cc7e86a26f4482b604aab5ee77980..9a182465b82b15efb393e61fd95a900aecf39c50 100644 (file)
@@ -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)