fixed crash in SetFirstVisible()

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@15018 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Vadim Zeitlin
2002-04-08 10:58:17 +00:00
parent 31205f361b
commit 992295c493
2 changed files with 14 additions and 2 deletions

View File

@@ -83,7 +83,13 @@ extern "C" gint wxlistbox_idle_callback( gpointer gdata )
gtk_idle_remove( data->m_tag );
data->m_listbox->SetFirstItem( data->m_item );
// check that the items haven't been deleted from the listbox since we had
// installed this callback
wxListBox *lbox = data->m_listbox;
if ( data->m_item < lbox->GetCount() )
{
lbox->SetFirstItem( data->m_item );
}
delete data;