wxDataViewCtrl::AssociateModel() wrongly delete m_notifier itself if the
control already had a model even though the notifier was registered using
AddNotifier() which also scheduled it for deletion when the old model itself
was destroyed. This resulted in double deletion and reproducible crash
whenever the model was changed.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@62577
c3d73ce0-8a6f-49c7-b76d-
6d57e0e08775
bool wxDataViewCtrl::AssociateModel( wxDataViewModel *model )
{
- if (GetModel())
+ if ( m_internal )
{
delete m_internal;
m_internal = NULL;
-
- delete m_notifier;
- m_notifier = NULL;
}
if (!wxDataViewCtrlBase::AssociateModel( model ))