X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/8228b8932abaedadbf9568bb3a1eef3ae25fb2a3..c1a3ff259eefe3d9ff85ee158dfb3af99e57ea62:/src/gtk/choice.cpp diff --git a/src/gtk/choice.cpp b/src/gtk/choice.cpp index 80343f91c1..84eb8ca7f0 100644 --- a/src/gtk/choice.cpp +++ b/src/gtk/choice.cpp @@ -485,7 +485,7 @@ void wxChoice::DoApplyWidgetStyle(GtkRcStyle *style) int wxChoice::GtkAddHelper(GtkWidget *menu, size_t pos, const wxString& item) { - wxCHECK_MSG(IsValidInsert(pos), -1, wxT("invalid index")); + wxCHECK_MSG((pos>=0) && (pos<=m_clientList.GetCount()), -1, wxT("invalid index")); GtkWidget *menu_item = gtk_menu_item_new_with_label( wxGTK_CONV( item ) );