From: Unknown (UG) Date: Sat, 17 Oct 1998 07:27:22 +0000 (+0000) Subject: fixes the invalid index problem X-Git-Url: https://git.saurik.com/wxWidgets.git/commitdiff_plain/49884e3e0d6e181c6be660a538211631815902b6 fixes the invalid index problem git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@860 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- diff --git a/src/msw/listbox.cpp b/src/msw/listbox.cpp index 2dd43b3b64..273b9a61be 100644 --- a/src/msw/listbox.cpp +++ b/src/msw/listbox.cpp @@ -294,7 +294,7 @@ void wxListBox::Append(const wxString& item) #if wxUSE_OWNER_DRAWN if ( m_windowStyle & wxLB_OWNERDRAW ) { - wxOwnerDrawn *pNewItem = CreateItem(-1); // dummy argument + wxOwnerDrawn *pNewItem = CreateItem(index); // dummy argument pNewItem->SetName(item); m_aItems.Add(pNewItem); ListBox_SetItemData(hwnd, index, pNewItem);