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