diff --git a/samples/text/text.cpp b/samples/text/text.cpp index 03d6096f28..5f4ba2899c 100644 --- a/samples/text/text.cpp +++ b/samples/text/text.cpp @@ -100,7 +100,7 @@ class MyPanel: public wxPanel { public: MyPanel(wxFrame *frame, int x, int y, int w, int h); - virtual ~MyPanel() { wxLog::SetActiveTarget(m_logOld); } + virtual ~MyPanel() { delete wxLog::SetActiveTarget(m_logOld); } #if wxUSE_CLIPBOARD void DoPasteFromClipboard();