X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/9a83f860948059b0273b5cc6d9e43fadad3ebfca..0738b901b17340f09766524b8d9d79e9ed1268e7:/src/msw/listctrl.cpp diff --git a/src/msw/listctrl.cpp b/src/msw/listctrl.cpp index 49204c2a05..52bf721d5e 100644 --- a/src/msw/listctrl.cpp +++ b/src/msw/listctrl.cpp @@ -224,11 +224,6 @@ public: wxDECLARE_NO_COPY_CLASS(wxMSWListItemData); }; -// Get the internal data structure -static wxMSWListItemData *wxGetInternalData(HWND hwnd, long itemId); -static wxMSWListItemData *wxGetInternalData(const wxListCtrl *ctl, long itemId); - - #if wxUSE_EXTENDED_RTTI WX_DEFINE_FLAGS( wxListCtrlStyle ) @@ -1758,7 +1753,10 @@ long wxListCtrl::InsertItem(const wxListItem& info) } } - long rv = ListView_InsertItem(GetHwnd(), & item); + const long rv = ListView_InsertItem(GetHwnd(), & item); + + // failing to insert the item is really unexpected + wxCHECK_MSG( rv != -1, rv, "failed to insert an item in wxListCtrl" ); m_count++; wxASSERT_MSG( m_count == ListView_GetItemCount(GetHwnd()),