fix for assert failure when deleting tree ctrl in-place edit window (sometimes)
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@8870 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
@@ -1596,6 +1596,14 @@ void wxTreeCtrl::DeleteTextCtrl()
|
|||||||
{
|
{
|
||||||
if ( m_textCtrl )
|
if ( m_textCtrl )
|
||||||
{
|
{
|
||||||
|
// the HWND corresponding to this control is deleted by the tree
|
||||||
|
// control itself and we don't know when exactly this happens, so check
|
||||||
|
// if the window still exists before calling UnsubclassWin()
|
||||||
|
if ( !::IsWindow(GetHwndOf(m_textCtrl)) )
|
||||||
|
{
|
||||||
|
m_textCtrl->SetHWND(0);
|
||||||
|
}
|
||||||
|
|
||||||
m_textCtrl->UnsubclassWin();
|
m_textCtrl->UnsubclassWin();
|
||||||
m_textCtrl->SetHWND(0);
|
m_textCtrl->SetHWND(0);
|
||||||
delete m_textCtrl;
|
delete m_textCtrl;
|
||||||
|
Reference in New Issue
Block a user