check index validity in AddGrowable{Row,Col}()
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@57175 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
parent
9f68fe76c9
commit
ef52f19e6a
@ -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 );
|
||||
|
Loading…
Reference in New Issue
Block a user