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
This commit is contained in:
Vadim Zeitlin
2007-09-18 12:06:46 +00:00
parent 00ceccee89
commit 88b9909d1a

View File

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