don't leave tables non-owned by the grid with dangling view pointer when the grid is deleted (patch 1310535)
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@43034 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
parent
e16ceb3ca6
commit
86020f7e33
@ -4198,8 +4198,12 @@ wxGrid::~wxGrid()
|
||||
total ? (gs_nAttrCacheHits*100) / total : 0);
|
||||
#endif
|
||||
|
||||
if (m_ownTable)
|
||||
// if we own the table, just delete it, otherwise at least don't leave it
|
||||
// with dangling view pointer
|
||||
if ( m_ownTable )
|
||||
delete m_table;
|
||||
else if ( m_table->GetView() == this )
|
||||
m_table->SetView(NULL);
|
||||
|
||||
delete m_typeRegistry;
|
||||
delete m_selection;
|
||||
|
Loading…
Reference in New Issue
Block a user