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; }