Applied Patch 760644 (wxGrid SetTable uses deleted wxGridTable).

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@21505 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Stefan Neis 2003-06-29 15:18:46 +00:00
parent 789bdf9b18
commit 86c7378f32

View File

@ -3913,14 +3913,19 @@ bool wxGrid::SetTable( wxGridTableBase *table, bool takeOwnership,
{
if ( m_created )
{
if (m_ownTable)
delete m_table;
// stop all processing
m_created = FALSE;
if (m_ownTable)
{
wxGridTableBase *t=m_table;
m_table=0;
delete t;
}
delete m_selection;
// stop all processing
m_table=0;
m_selection=0;
m_created = FALSE;
m_numRows=0;
m_numCols=0;
}