From: Vadim Zeitlin Date: Mon, 22 Mar 2010 11:40:19 +0000 (+0000) Subject: Fix the selection validity check in wxSingleChoiceDialog. X-Git-Url: https://git.saurik.com/wxWidgets.git/commitdiff_plain/e0856740af67e476a6230fb703b06f208437be53?ds=inline Fix the selection validity check in wxSingleChoiceDialog. Fix the typo ("> 0" was used instead of ">= 0") introduced in r63731. Closes #11844. git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@63734 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- diff --git a/src/generic/choicdgg.cpp b/src/generic/choicdgg.cpp index 073e669417..79f7019d0d 100644 --- a/src/generic/choicdgg.cpp +++ b/src/generic/choicdgg.cpp @@ -531,7 +531,7 @@ bool wxSingleChoiceDialog::Create( wxWindow *parent, // Set the selection void wxSingleChoiceDialog::SetSelection(int sel) { - wxCHECK_RET( sel > 0 && (unsigned)sel < m_listbox->GetCount(), + wxCHECK_RET( sel >= 0 && (unsigned)sel < m_listbox->GetCount(), "Invalid initial selection" ); m_listbox->SetSelection(sel);