From: Robert Roebling Date: Thu, 16 Oct 2008 21:32:26 +0000 (+0000) Subject: Dont't finish any editing if there is no control X-Git-Url: https://git.saurik.com/wxWidgets.git/commitdiff_plain/33a1719a95b800e06231c0b2e3337cbe2632eb34 Dont't finish any editing if there is no control git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@56378 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- diff --git a/src/common/datavcmn.cpp b/src/common/datavcmn.cpp index 54cf959002..eaf672d2a5 100644 --- a/src/common/datavcmn.cpp +++ b/src/common/datavcmn.cpp @@ -720,6 +720,8 @@ bool wxDataViewRendererBase::StartEditing( const wxDataViewItem &item, wxRect la void wxDataViewRendererBase::CancelEditing() { + if (!m_editorCtrl) return; + GetOwner()->GetOwner()->GetMainWindow()->SetFocus(); m_editorCtrl->Hide(); @@ -728,6 +730,8 @@ void wxDataViewRendererBase::CancelEditing() bool wxDataViewRendererBase::FinishEditing() { + if (!m_editorCtrl) return true; + wxVariant value; GetValueFromEditorCtrl( m_editorCtrl, value );