]> git.saurik.com Git - wxWidgets.git/commitdiff
Suppress assertion when the array is sorted
authorJulian Smart <julian@anthemion.co.uk>
Tue, 6 Jun 2006 11:03:31 +0000 (11:03 +0000)
committerJulian Smart <julian@anthemion.co.uk>
Tue, 6 Jun 2006 11:03:31 +0000 (11:03 +0000)
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@39586 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775

src/mac/carbon/choice.cpp

index d4268c6e97b765b6f4c21fef011dbb937b47b2c2..f2173eb03ce648f273d0f1b15a4fab6d8b584a0e 100644 (file)
@@ -217,6 +217,12 @@ unsigned int wxChoice::GetCount() const
 
 int wxChoice::FindString( const wxString& s, bool bCase ) const
 {
+#if !wxUSE_STL
+    // Avoid assert for non-default args passed to sorted array Index
+    if ( HasFlag(wxCB_SORT) )
+        bCase = true;
+#endif
+
     return m_strings.Index( s , bCase ) ;
 }