From ca01f8dfe5f2c3b1013e3aedd419670f499fc945 Mon Sep 17 00:00:00 2001 From: Robin Dunn Date: Sat, 7 Jun 2003 15:54:41 +0000 Subject: [PATCH] revert my last change git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_2_4_BRANCH@20995 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- src/mac/carbon/choice.cpp | 4 ++-- src/mac/choice.cpp | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/src/mac/carbon/choice.cpp b/src/mac/carbon/choice.cpp index cfc8e65ed6..a8cb9b6667 100644 --- a/src/mac/carbon/choice.cpp +++ b/src/mac/carbon/choice.cpp @@ -195,8 +195,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, + "invalid index in wxChoice::GetClientData" ); return (void *)m_datas[n]; } diff --git a/src/mac/choice.cpp b/src/mac/choice.cpp index cfc8e65ed6..a8cb9b6667 100644 --- a/src/mac/choice.cpp +++ b/src/mac/choice.cpp @@ -195,8 +195,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, + "invalid index in wxChoice::GetClientData" ); return (void *)m_datas[n]; }