diff --git a/src/common/datavcmn.cpp b/src/common/datavcmn.cpp index febc1d1bf4..79b97c5c41 100644 --- a/src/common/datavcmn.cpp +++ b/src/common/datavcmn.cpp @@ -672,6 +672,8 @@ wxDataViewRendererBase::wxDataViewRendererBase( const wxString &varianttype, wxDataViewRendererBase::~wxDataViewRendererBase() { + if ( m_editorCtrl ) + DestroyEditControl(); } wxDataViewCtrl* wxDataViewRendererBase::GetView() const @@ -740,6 +742,8 @@ void wxDataViewRendererBase::DestroyEditControl() wxPendingDelete.Append(handler); wxPendingDelete.Append(m_editorCtrl); + + m_editorCtrl = NULL; } void wxDataViewRendererBase::CancelEditing()