]> git.saurik.com Git - wxWidgets.git/blobdiff - src/msw/listctrl.cpp
textctrl fixes
[wxWidgets.git] / src / msw / listctrl.cpp
index f2992b3db4727efac82d10c1e5a81fe0ae6ed0b9..b5bbc4a4be1d8ea08cd5345d058cebe428ea68b3 100644 (file)
@@ -918,7 +918,6 @@ bool wxListCtrl::SetItem(wxListItem& info)
     // call ListView_SetItem() at all
     if ( item.mask )
     {
-        item.cchTextMax = 0;
         if ( !ListView_SetItem(GetHwnd(), &item) )
         {
             wxLogDebug(_T("ListView_SetItem() failed"));
@@ -3201,6 +3200,9 @@ static void wxConvertToMSWListItem(const wxListCtrl *ctrl,
                                    const wxListItem& info,
                                    LV_ITEM& lvItem)
 {
+    wxASSERT_MSG( 0 <= info.m_col && info.m_col < ctrl->GetColumnCount(),
+                  "wxListCtrl column index out of bounds" );
+
     lvItem.iItem = (int) info.m_itemId;
 
     lvItem.iImage = info.m_image;