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:
Vadim Zeitlin
2003-08-03 22:57:19 +00:00
parent 77bf4cefcd
commit 9bd419070f

View File

@@ -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