X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/9b5f1895643cf94b38ac19a4c1151e259310852e..b0d8bfa6cd4042d3ea8680ad0145f79e3cb15268:/src/motif/combobox_native.cpp diff --git a/src/motif/combobox_native.cpp b/src/motif/combobox_native.cpp index 80245a8370..fa3204e238 100644 --- a/src/motif/combobox_native.cpp +++ b/src/motif/combobox_native.cpp @@ -216,9 +216,9 @@ int wxComboBox::DoAppend(const wxString& item) int wxComboBox::DoInsert(const wxString& item, int pos) { wxCHECK_MSG(!(GetWindowStyle() & wxCB_SORT), -1, wxT("can't insert into sorted list")); - wxCHECK_MSG((pos>=0) && (pos<=GetCount()), -1, wxT("invalid index")); + wxCHECK_MSG(IsValidInsert(pos), -1, wxT("invalid index")); - if (pos == GetCount()) + if ((size_t)pos == GetCount()) return DoAppend(item); wxXmString str( item.c_str() );