]> git.saurik.com Git - wxWidgets.git/blobdiff - src/msw/listctrl.cpp
Fix MSW compilation with wxUSE_DEFERRED_SIZING==0.
[wxWidgets.git] / src / msw / listctrl.cpp
index 5e0e786436e6b86ca9f8fe93fcf0d00e98090cb3..484443466f86dc586a619bf350308a9f9bfee950 100644 (file)
@@ -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;
                         }
                     }