From 9bd419070f0007769d1faf95cf8576c0025c7ff5 Mon Sep 17 00:00:00 2001 From: Vadim Zeitlin Date: Sun, 3 Aug 2003 22:57:19 +0000 Subject: [PATCH] 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 --- src/generic/imaglist.cpp | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/generic/imaglist.cpp b/src/generic/imaglist.cpp index 18a0f826ff..15ec2cc5e1 100644 --- a/src/generic/imaglist.cpp +++ b/src/generic/imaglist.cpp @@ -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 -- 2.47.2