git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@39149
c3d73ce0-8a6f-49c7-b76d-
6d57e0e08775
// Sets information about the item
bool wxListCtrl::SetItem(wxListItem& info)
{
// Sets information about the item
bool wxListCtrl::SetItem(wxListItem& info)
{
+ const long id = info.GetId();
+ wxCHECK_MSG( id >= 0 && id < GetItemCount(), false,
+ _T("invalid item index in SetItem") );
+
LV_ITEM item;
wxConvertToMSWListItem(this, info, item);
LV_ITEM item;
wxConvertToMSWListItem(this, info, item);
{
// get internal item data
// perhaps a cache here ?
{
// get internal item data
// perhaps a cache here ?
- wxListItemInternalData *data = wxGetInternalData(this, info.m_itemId);
+ wxListItemInternalData *data = wxGetInternalData(this, id);