Change some wxASSERT's to wxCHECK's so the offending code will safely
be skipped instead of causing a crash. (Backported from 2.5) git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_2_4_BRANCH@23833 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
@@ -3090,24 +3090,26 @@ int wxGridStringTable::GetNumberCols()
|
||||
|
||||
wxString wxGridStringTable::GetValue( int row, int col )
|
||||
{
|
||||
wxASSERT_MSG( (row < GetNumberRows()) && (col < GetNumberCols()),
|
||||
_T("invalid row or column index in wxGridStringTable") );
|
||||
wxCHECK_MSG( (row < GetNumberRows()) && (col < GetNumberCols()),
|
||||
wxEmptyString,
|
||||
_T("invalid row or column index in wxGridStringTable") );
|
||||
|
||||
return m_data[row][col];
|
||||
}
|
||||
|
||||
void wxGridStringTable::SetValue( int row, int col, const wxString& value )
|
||||
{
|
||||
wxASSERT_MSG( (row < GetNumberRows()) && (col < GetNumberCols()),
|
||||
_T("invalid row or column index in wxGridStringTable") );
|
||||
wxCHECK_RET( (row < GetNumberRows()) && (col < GetNumberCols()),
|
||||
_T("invalid row or column index in wxGridStringTable") );
|
||||
|
||||
m_data[row][col] = value;
|
||||
}
|
||||
|
||||
bool wxGridStringTable::IsEmptyCell( int row, int col )
|
||||
{
|
||||
wxASSERT_MSG( (row < GetNumberRows()) && (col < GetNumberCols()),
|
||||
_T("invalid row or column index in wxGridStringTable") );
|
||||
wxCHECK_MSG( (row < GetNumberRows()) && (col < GetNumberCols()),
|
||||
TRUE,
|
||||
_T("invalid row or column index in wxGridStringTable") );
|
||||
|
||||
return (m_data[row][col] == wxEmptyString);
|
||||
}
|
||||
|
Reference in New Issue
Block a user