X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/20a0e99964951da1c54abf11f6dd7cd2925b8b0e..15811f2f674720ba7da5353066ef71cd5621c081:/src/msw/textctrl.cpp diff --git a/src/msw/textctrl.cpp b/src/msw/textctrl.cpp index c40ef670da..7218b339f2 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 && wxUSE_RICHEDIT + 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 && wxUSE_RICHEDIT + delete m_privateContextMenu; }