]> git.saurik.com Git - wxWidgets.git/commitdiff
revert my last change
authorRobin Dunn <robin@alldunn.com>
Sat, 7 Jun 2003 15:54:41 +0000 (15:54 +0000)
committerRobin Dunn <robin@alldunn.com>
Sat, 7 Jun 2003 15:54:41 +0000 (15:54 +0000)
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@20995 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775

src/mac/carbon/choice.cpp
src/mac/choice.cpp

index 4342deb27cc10100d2e9a40fb69360a21718f1ec..83e91dbfaba6811749ab51e7931428d210cc28c8 100644 (file)
@@ -192,9 +192,8 @@ void wxChoice::DoSetItemClientData( int n, void* clientData )
 
 void *wxChoice::DoGetItemClientData(int n) const
 {
-    if ( n < 0 || (size_t)n >= m_datas.GetCount() )
-        return (void*)NULL;
-
+    wxCHECK_MSG( n >= 0 && (size_t)n < m_datas.GetCount(), NULL,
+                 wxT("invalid index in wxChoice::GetClientData") );
     return (void *)m_datas[n];
 }
 
index 4342deb27cc10100d2e9a40fb69360a21718f1ec..83e91dbfaba6811749ab51e7931428d210cc28c8 100644 (file)
@@ -192,9 +192,8 @@ void wxChoice::DoSetItemClientData( int n, void* clientData )
 
 void *wxChoice::DoGetItemClientData(int n) const
 {
-    if ( n < 0 || (size_t)n >= m_datas.GetCount() )
-        return (void*)NULL;
-
+    wxCHECK_MSG( n >= 0 && (size_t)n < m_datas.GetCount(), NULL,
+                 wxT("invalid index in wxChoice::GetClientData") );
     return (void *)m_datas[n];
 }