X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/fe42ab1d7bf89e823e55903ce449eb90ea195ee2..46405e36bf9962b251e77e5048e96bf6a54edb15:/src/msw/toolbar.cpp diff --git a/src/msw/toolbar.cpp b/src/msw/toolbar.cpp index e0a51a13c0..44f08bffb8 100644 --- a/src/msw/toolbar.cpp +++ b/src/msw/toolbar.cpp @@ -405,11 +405,7 @@ void wxToolBar::Recreate() m_hBitmap = 0; } - if ( m_disabledImgList ) - { - delete m_disabledImgList; - m_disabledImgList = NULL; - } + wxDELETE(m_disabledImgList); Realize(); } @@ -610,11 +606,7 @@ bool wxToolBar::DoDeleteTool(size_t pos, wxToolBarToolBase *tool) void wxToolBar::CreateDisabledImageList() { - if (m_disabledImgList != NULL) - { - delete m_disabledImgList; - m_disabledImgList = NULL; - } + wxDELETE(m_disabledImgList); // as we can't use disabled image list with older versions of comctl32.dll, // don't even bother creating it