]> git.saurik.com Git - wxWidgets.git/commitdiff
fixes the invalid index problem
authorUnknown (UG) <nobody@localhost>
Sat, 17 Oct 1998 07:27:22 +0000 (07:27 +0000)
committerUnknown (UG) <nobody@localhost>
Sat, 17 Oct 1998 07:27:22 +0000 (07:27 +0000)
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@860 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775

src/msw/listbox.cpp

index 2dd43b3b649ac3e9b0aa0248b5f201d6d70b6c26..273b9a61be55295c38f595d9b7c6e48344636d23 100644 (file)
@@ -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);