X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/b7bc9d806b57f20e1d3135025ba0e6f603e7450e..fa3d4aaf0fdffa51372d15f17862cb7081687107:/src/common/sizer.cpp diff --git a/src/common/sizer.cpp b/src/common/sizer.cpp index beb46796bc..63a832d8ff 100644 --- a/src/common/sizer.cpp +++ b/src/common/sizer.cpp @@ -1830,7 +1830,8 @@ bool wxFlexGridSizer::IsColGrowable( size_t idx ) void wxFlexGridSizer::AddGrowableRow( size_t idx, int proportion ) { - wxASSERT_MSG( !IsRowGrowable( idx ), + wxCHECK_RET( idx < (size_t)GetRows(), "invalid row index" ); + wxASSERT_MSG( !IsRowGrowable( idx ), "AddGrowableRow() called for growable row" ); m_growableRows.Add( idx ); m_growableRowsProportions.Add( proportion ); @@ -1838,7 +1839,8 @@ void wxFlexGridSizer::AddGrowableRow( size_t idx, int proportion ) void wxFlexGridSizer::AddGrowableCol( size_t idx, int proportion ) { - wxASSERT_MSG( !IsColGrowable( idx ), + wxCHECK_RET( idx < (size_t)GetCols(), "invalid column index" ); + wxASSERT_MSG( !IsColGrowable( idx ), "AddGrowableCol() called for growable column" ); m_growableCols.Add( idx ); m_growableColsProportions.Add( proportion );