From f28ceaff195e08068577138453b799596042afd9 Mon Sep 17 00:00:00 2001 From: Chris Elliott Date: Fri, 26 Sep 2003 09:44:04 +0000 Subject: [PATCH] suppress warning if no entries in combobox git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_2_4_BRANCH@23927 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- src/univ/combobox.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/univ/combobox.cpp b/src/univ/combobox.cpp index 74b01d4174..2ab54469a6 100644 --- a/src/univ/combobox.cpp +++ b/src/univ/combobox.cpp @@ -787,7 +787,7 @@ int wxComboBox::FindString(const wxString& s) const void wxComboBox::Select(int n) { - wxCHECK_RET( (n >= 0) && (n < GetCount()), _T("invalid index in wxComboBox::Select") ); + wxCHECK_RET( (n >= 0) && (n < GetCount()) && (GetCount() > 0), _T("invalid index in wxComboBox::Select ") ); GetLBox()->SetSelection(n); GetText()->SetValue(GetLBox()->GetString(n));