Use CHECK, not ASSERT, in wxSizer::Replace() if item is NULL
This is a violation of function preconditions, so don't bother doing anything in this case.
This commit is contained in:
parent
31632c4fbb
commit
187cbf1efa
@ -869,7 +869,7 @@ bool wxSizer::Replace( wxSizer *oldsz, wxSizer *newsz, bool recursive )
|
||||
bool wxSizer::Replace( size_t old, wxSizerItem *newitem )
|
||||
{
|
||||
wxCHECK_MSG( old < m_children.GetCount(), false, wxT("Replace index is out of range") );
|
||||
wxASSERT_MSG( newitem, wxT("Replacing with NULL item") );
|
||||
wxCHECK_MSG( newitem, false, wxT("Replacing with NULL item") );
|
||||
|
||||
wxSizerItemList::compatibility_iterator node = m_children.Item( old );
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user