check that we use bitmaps of correct size in the image list
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@22554 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
@@ -67,6 +67,11 @@ bool wxGenericImageList::Create()
|
||||
|
||||
int wxGenericImageList::Add( const wxBitmap &bitmap )
|
||||
{
|
||||
wxASSERT_MSG( bitmap.GetWidth() == m_width &&
|
||||
bitmap.GetHeight() == m_height,
|
||||
_T("invalid bitmap size in wxImageList: this might work ")
|
||||
_T("on this platform but definitely won't under Windows.") );
|
||||
|
||||
if (bitmap.IsKindOf(CLASSINFO(wxIcon)))
|
||||
m_images.Append( new wxIcon( (const wxIcon&) bitmap ) );
|
||||
else
|
||||
|
Reference in New Issue
Block a user