+#if wxDEBUG_LEVEL
+ // by the time this function is called, the sizer should be already fully
+ // initialized and hence the number of its columns and rows is known and we
+ // can check that all indices in m_growableCols/Rows are valid (see also
+ // comments in AddGrowableCol/Row())
+ if ( !m_rows || !m_cols )
+ {
+ int nrows, ncols;
+ CalcRowsCols(nrows, ncols);
+
+ if ( !m_rows )
+ {
+ for ( size_t n = 0; n < m_growableRows.size(); n++ )
+ {
+ wxASSERT_MSG( m_growableRows[n] < nrows,
+ "invalid growable row index" );
+ }
+ }
+
+ if ( !m_cols )
+ {
+ for ( size_t n = 0; n < m_growableCols.size(); n++ )
+ {
+ wxASSERT_MSG( m_growableCols[n] < ncols,
+ "invalid growable column index" );
+ }
+ }
+ }
+#endif // wxDEBUG_LEVEL
+
+