From 88b9909d1a4f51b23d35a672bc404eb59d25eb75 Mon Sep 17 00:00:00 2001 From: Vadim Zeitlin Date: Tue, 18 Sep 2007 12:06:46 +0000 Subject: [PATCH] fix for the last commit: reset the dummy wxRICHTEXT_DEFAULT_DROPTARGET pointer in dtor to avoid crashing when trying to delete it in the base class dtor git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@48764 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- src/msw/textctrl.cpp | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/src/msw/textctrl.cpp b/src/msw/textctrl.cpp index c40ef670da..9dc6104f23 100644 --- a/src/msw/textctrl.cpp +++ b/src/msw/textctrl.cpp @@ -298,6 +298,14 @@ void wxTextCtrl::Init() wxTextCtrl::~wxTextCtrl() { +#if wxUSE_DRAG_AND_DROP + if ( m_dropTarget == wxRICHTEXT_DEFAULT_DROPTARGET ) + { + // don't try to destroy this dummy pointer in the base class dtor + m_dropTarget = NULL; + } +#endif // wxUSE_DRAG_AND_DROP + delete m_privateContextMenu; } -- 2.45.2