X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/417b8fcc49295f5c4e33d0ea1b706da87085db08..9741fd45f734ea30e094f5b15f092b8394621204:/src/msw/listctrl.cpp diff --git a/src/msw/listctrl.cpp b/src/msw/listctrl.cpp index 5e0e786436..484443466f 100644 --- a/src/msw/listctrl.cpp +++ b/src/msw/listctrl.cpp @@ -497,8 +497,7 @@ void wxListCtrl::DeleteEditControl() { m_textCtrl->UnsubclassWin(); m_textCtrl->SetHWND(0); - delete m_textCtrl; - m_textCtrl = NULL; + wxDELETE(m_textCtrl); } } @@ -1539,8 +1538,7 @@ wxTextCtrl* wxListCtrl::EditLabel(long item, wxClassInfo* textControlClass) if ( !hWnd ) { // failed to start editing - delete m_textCtrl; - m_textCtrl = NULL; + wxDELETE(m_textCtrl); return NULL; } @@ -2246,8 +2244,7 @@ bool wxListCtrl::MSWOnNotify(int idCtrl, WXLPARAM lParam, WXLPARAM *result) if ( m_internalData[n] == data ) { m_internalData.erase(m_internalData.begin() + n); - delete data; - data = NULL; + wxDELETE(data); break; } }