]> git.saurik.com Git - wxWidgets.git/commitdiff
Fixed property iterator crash when iterating through 'non-interesting' properties...
authorJaakko Salli <jaakko.salli@dnainternet.net>
Sun, 6 Sep 2009 07:53:53 +0000 (07:53 +0000)
committerJaakko Salli <jaakko.salli@dnainternet.net>
Sun, 6 Sep 2009 07:53:53 +0000 (07:53 +0000)
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@61839 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775

src/propgrid/propgridpagestate.cpp

index 91fe89e6f9708aa6251b1c684557d8c369021cc5..b1dd806885cad145b0baccc847c4fc29afe75e6b 100644 (file)
@@ -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) &&