]> git.saurik.com Git - wxWidgets.git/blobdiff - src/generic/grid.cpp
avoid assert in DoGetBestSize() for an empty tree
[wxWidgets.git] / src / generic / grid.cpp
index 0b9df4311277cc829694bfa421d8e860da41760e..0e77e10991d68a32df7cdd741bf6c354497f5e18 100644 (file)
@@ -1234,7 +1234,7 @@ bool wxGridCellFloatEditor::IsAcceptedKey(wxKeyEvent& event)
 // ----------------------------------------------------------------------------
 
 // the default values for GetValue()
-wxString wxGridCellBoolEditor::ms_stringValues[2] = { _T("1"), _T("") };
+wxString wxGridCellBoolEditor::ms_stringValues[2] = { _T(""), _T("1") };
 
 void wxGridCellBoolEditor::Create(wxWindow* parent,
                                   wxWindowID id,
@@ -4202,7 +4202,7 @@ wxGrid::~wxGrid()
     // with dangling view pointer
     if ( m_ownTable )
         delete m_table;
-    else if ( m_table->GetView() == this )
+    else if ( m_table && m_table->GetView() == this )
         m_table->SetView(NULL);
 
     delete m_typeRegistry;