Do not initialize base class variable and do not leak old allocation
This commit is contained in:
parent
315a9460c0
commit
82523b3d3b
@ -221,8 +221,6 @@ void wxWindowQt::Init()
|
||||
#endif
|
||||
m_qtWindow = NULL;
|
||||
m_qtContainer = NULL;
|
||||
|
||||
m_dropTarget = NULL;
|
||||
}
|
||||
|
||||
wxWindowQt::wxWindowQt()
|
||||
@ -695,6 +693,7 @@ void wxWindowQt::SetDropTarget( wxDropTarget *dropTarget )
|
||||
if ( m_dropTarget != NULL )
|
||||
{
|
||||
m_dropTarget->Disconnect();
|
||||
delete m_dropTarget;
|
||||
}
|
||||
|
||||
m_dropTarget = dropTarget;
|
||||
|
Loading…
Reference in New Issue
Block a user