fixed memory leak
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@36227 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
parent
0c38974967
commit
2c62259349
@ -509,6 +509,12 @@ bool wxToolBar::DoDeleteTool(size_t pos, wxToolBarToolBase *tool)
|
||||
|
||||
void wxToolBar::CreateDisabledImageList()
|
||||
{
|
||||
if (m_disabledImgList != NULL)
|
||||
{
|
||||
delete m_disabledImgList;
|
||||
m_disabledImgList = NULL;
|
||||
}
|
||||
|
||||
// as we can't use disabled image list with older versions of comctl32.dll,
|
||||
// don't even bother creating it
|
||||
if ( wxTheApp->GetComCtl32Version() >= 470 )
|
||||
@ -528,14 +534,12 @@ void wxToolBar::CreateDisabledImageList()
|
||||
bmpDisabled.GetMask() != NULL,
|
||||
GetToolsCount()
|
||||
);
|
||||
return;
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
// we don't have any disabled bitmaps
|
||||
}
|
||||
|
||||
m_disabledImgList = NULL;
|
||||
}
|
||||
|
||||
bool wxToolBar::Realize()
|
||||
@ -631,8 +635,6 @@ bool wxToolBar::Realize()
|
||||
totalBitmapWidth, totalBitmapHeight);
|
||||
|
||||
dcAllButtons.SelectObject(bitmap);
|
||||
|
||||
|
||||
}
|
||||
#endif // !__WXWINCE__
|
||||
|
||||
@ -726,8 +728,6 @@ bool wxToolBar::Realize()
|
||||
// Map to system colours
|
||||
hBitmap = (HBITMAP)MapBitmap((WXHBITMAP) hBitmap,
|
||||
totalBitmapWidth, totalBitmapHeight);
|
||||
|
||||
|
||||
}
|
||||
|
||||
bool addBitmap = true;
|
||||
|
Loading…
Reference in New Issue
Block a user