Avoid assert when the position to be removed is beyond the end of the
list and just return FALSE as documented git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_2_4_BRANCH@17444 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
@@ -361,6 +361,8 @@ bool wxSizer::Remove( wxSizer *sizer )
|
||||
|
||||
bool wxSizer::Remove( int pos )
|
||||
{
|
||||
if ((size_t)pos >= m_children.GetCount())
|
||||
return FALSE;
|
||||
wxNode *node = m_children.Nth( pos );
|
||||
if (!node) return FALSE;
|
||||
|
||||
|
Reference in New Issue
Block a user