better check of parameter in Delete() (2nd part of patch 646145)
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@18068 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
@@ -274,7 +274,8 @@ void wxListBox::Clear()
|
|||||||
|
|
||||||
void wxListBox::Delete(int n)
|
void wxListBox::Delete(int n)
|
||||||
{
|
{
|
||||||
wxCHECK_RET( n < GetCount(), _T("invalid index in wxListBox::Delete") );
|
wxCHECK_RET( n >= 0 && n < GetCount(),
|
||||||
|
_T("invalid index in wxListBox::Delete") );
|
||||||
|
|
||||||
// do it before removing the index as otherwise the last item will not be
|
// do it before removing the index as otherwise the last item will not be
|
||||||
// refreshed (as GetCount() will be decremented)
|
// refreshed (as GetCount() will be decremented)
|
||||||
|
Reference in New Issue
Block a user