Do not assert if not editing a label when calling wxGenericTreeCtrl::EndEditLabel

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@76852 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Tim Kosse 2014-07-06 10:01:31 +00:00
parent dc80770bd3
commit f1501f0928

View File

@ -3510,9 +3510,10 @@ wxTextCtrl* wxGenericTreeCtrl::GetEditControl() const
void wxGenericTreeCtrl::EndEditLabel(const wxTreeItemId& WXUNUSED(item),
bool discardChanges)
{
wxCHECK_RET( m_textCtrl, wxT("not editing label") );
m_textCtrl->EndEdit(discardChanges);
if (m_textCtrl)
{
m_textCtrl->EndEdit(discardChanges);
}
}
bool wxGenericTreeCtrl::OnRenameAccept(wxGenericTreeItem *item,