]> git.saurik.com Git - wxWidgets.git/commitdiff
check that we use bitmaps of correct size in the image list
authorVadim Zeitlin <vadim@wxwidgets.org>
Sun, 3 Aug 2003 22:57:19 +0000 (22:57 +0000)
committerVadim Zeitlin <vadim@wxwidgets.org>
Sun, 3 Aug 2003 22:57:19 +0000 (22:57 +0000)
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@22554 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775

src/generic/imaglist.cpp

index 18a0f826ffdfd0e078a776e77eddf3bede7df91f..15ec2cc5e165d159a7e90993b86561d65b3cb96a 100644 (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