no need to test that the pointer is non-NULL before deleting it (closes #10070)
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@56269 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
@@ -547,7 +547,6 @@ wxDataViewCustomRenderer::wxDataViewCustomRenderer(wxString const& varianttype,
|
|||||||
|
|
||||||
wxDataViewCustomRenderer::~wxDataViewCustomRenderer()
|
wxDataViewCustomRenderer::~wxDataViewCustomRenderer()
|
||||||
{
|
{
|
||||||
if (this->m_DCPtr != NULL)
|
|
||||||
delete this->m_DCPtr;
|
delete this->m_DCPtr;
|
||||||
} /* wxDataViewCustomRenderer::~wxDataViewCustomRenderer() */
|
} /* wxDataViewCustomRenderer::~wxDataViewCustomRenderer() */
|
||||||
|
|
||||||
|
@@ -347,8 +347,7 @@ wxMenu * wxDockTaskBarIcon::DoCreatePopupMenu()
|
|||||||
|
|
||||||
if (theNewMenu)
|
if (theNewMenu)
|
||||||
{
|
{
|
||||||
if (m_pMenu)
|
delete m_pMenu;
|
||||||
delete m_pMenu;
|
|
||||||
m_pMenu = theNewMenu;
|
m_pMenu = theNewMenu;
|
||||||
m_pMenu->SetInvokingWindow(m_menuEventWindow);
|
m_pMenu->SetInvokingWindow(m_menuEventWindow);
|
||||||
}
|
}
|
||||||
@@ -442,8 +441,7 @@ bool wxDockTaskBarIcon::PopupMenu(wxMenu *menu)
|
|||||||
{
|
{
|
||||||
wxASSERT(menu != NULL);
|
wxASSERT(menu != NULL);
|
||||||
|
|
||||||
if (m_pMenu)
|
delete m_pMenu;
|
||||||
delete m_pMenu;
|
|
||||||
|
|
||||||
// start copy of menu
|
// start copy of menu
|
||||||
m_pMenu = wxDeepCopyMenu(menu);
|
m_pMenu = wxDeepCopyMenu(menu);
|
||||||
|
@@ -190,8 +190,7 @@ void wxMacToolTip::Setup( WindowRef win , const wxString& text , const wxPoint&
|
|||||||
s_ToolTipWindowRef = m_window ;
|
s_ToolTipWindowRef = m_window ;
|
||||||
m_backpict = NULL ;
|
m_backpict = NULL ;
|
||||||
#if wxUSE_TIMER
|
#if wxUSE_TIMER
|
||||||
if ( m_timer )
|
delete m_timer ;
|
||||||
delete m_timer ;
|
|
||||||
|
|
||||||
m_timer = new wxMacToolTipTimer( this , s_ToolTipDelay ) ;
|
m_timer = new wxMacToolTipTimer( this , s_ToolTipDelay ) ;
|
||||||
#endif // wxUSE_TIMER
|
#endif // wxUSE_TIMER
|
||||||
|
@@ -174,8 +174,7 @@ wxJoystick::~wxJoystick()
|
|||||||
if (m_thread)
|
if (m_thread)
|
||||||
m_thread->Delete(); // It's detached so it will delete itself
|
m_thread->Delete(); // It's detached so it will delete itself
|
||||||
|
|
||||||
if (m_hid)
|
delete m_hid;
|
||||||
delete m_hid;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
//---------------------------------------------------------------------------
|
//---------------------------------------------------------------------------
|
||||||
|
@@ -411,8 +411,7 @@ bool wxMacPrinter::Print(wxWindow *parent, wxPrintout *printout, bool prompt)
|
|||||||
// May have pressed cancel.
|
// May have pressed cancel.
|
||||||
if (!dc || !dc->IsOk())
|
if (!dc || !dc->IsOk())
|
||||||
{
|
{
|
||||||
if (dc)
|
delete dc;
|
||||||
delete dc;
|
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@@ -448,8 +448,7 @@ void wxWindowMac::DoReleaseMouse()
|
|||||||
|
|
||||||
void wxWindowMac::SetDropTarget(wxDropTarget *pDropTarget)
|
void wxWindowMac::SetDropTarget(wxDropTarget *pDropTarget)
|
||||||
{
|
{
|
||||||
if ( m_dropTarget != NULL )
|
delete m_dropTarget;
|
||||||
delete m_dropTarget;
|
|
||||||
|
|
||||||
m_dropTarget = pDropTarget;
|
m_dropTarget = pDropTarget;
|
||||||
if ( m_dropTarget != NULL )
|
if ( m_dropTarget != NULL )
|
||||||
|
Reference in New Issue
Block a user