]> git.saurik.com Git - wxWidgets.git/blobdiff - src/propgrid/propgridiface.cpp
fix gcc 3.3 warning about possibly uninitialized (but in reality initialized) variabl...
[wxWidgets.git] / src / propgrid / propgridiface.cpp
index 3b4bfe078c1538282d4c3711431d55d07e2036fa..13b09fc78d0481c3bec77d5c4e5ffd28b144c045 100644 (file)
@@ -361,11 +361,16 @@ bool wxPropertyGridInterface::ClearSelection( bool validation )
         flags |= wxPG_SEL_NOVALIDATE;
 
     wxPropertyGridPageState* state = m_pState;
-    wxPropertyGrid* pg = state->GetGrid();
-    if ( pg->GetState() == state )
-        return pg->DoSelectProperty(NULL, flags);
-    else
-        state->SetSelection(NULL);
+
+    if ( state )
+    {
+        wxPropertyGrid* pg = state->GetGrid();
+        if ( pg->GetState() == state )
+            return pg->DoSelectProperty(NULL, flags);
+        else
+            state->SetSelection(NULL);
+    }
+
     return true;
 }
 
@@ -1003,7 +1008,7 @@ wxString wxPropertyGridInterface::SaveEditableState( int includedStates ) const
 
                 if ( !p->HasFlag(wxPG_PROP_COLLAPSED) )
                     result += EscapeDelimiters(p->GetName());
-                    result += wxS(",");
+                result += wxS(",");
 
             }