From: Jaakko Salli Date: Sun, 6 Sep 2009 07:53:53 +0000 (+0000) Subject: Fixed property iterator crash when iterating through 'non-interesting' properties... X-Git-Url: https://git.saurik.com/wxWidgets.git/commitdiff_plain/6e82ecf99d6cad0cea593604ba411ec40827b909 Fixed property iterator crash when iterating through 'non-interesting' properties at the edges of the grid. git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@61839 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- diff --git a/src/propgrid/propgridpagestate.cpp b/src/propgrid/propgridpagestate.cpp index 91fe89e6f9..b1dd806885 100644 --- a/src/propgrid/propgridpagestate.cpp +++ b/src/propgrid/propgridpagestate.cpp @@ -107,7 +107,8 @@ void wxPropertyGridIteratorBase::Assign( const wxPropertyGridIteratorBase& it ) void wxPropertyGridIteratorBase::Prev() { wxPGProperty* property = m_property; - wxASSERT( property ); + if ( !property ) + return; wxPGProperty* parent = property->GetParent(); wxASSERT( parent ); @@ -152,7 +153,8 @@ void wxPropertyGridIteratorBase::Prev() void wxPropertyGridIteratorBase::Next( bool iterateChildren ) { wxPGProperty* property = m_property; - wxASSERT( property ); + if ( !property ) + return; if ( property->GetChildCount() && wxPG_ITERATOR_PARENTEXMASK_TEST(property, m_parentExMask) &&