From: Vadim Zeitlin Date: Tue, 18 Sep 2007 12:06:46 +0000 (+0000) Subject: fix for the last commit: reset the dummy wxRICHTEXT_DEFAULT_DROPTARGET pointer in... X-Git-Url: https://git.saurik.com/wxWidgets.git/commitdiff_plain/88b9909d1a4f51b23d35a672bc404eb59d25eb75 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 --- 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; }