Applied #9140 (wxMac: Calculate size of bitmaps correctly when w or h is 0)

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_2_8_BRANCH@62124 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Julian Smart
2009-09-25 13:23:26 +00:00
parent 8e12cd29d0
commit e221b1ce84

View File

@@ -224,8 +224,8 @@ bool wxBitmapRefData::Create( int w , int h , int d )
m_depth = d ;
m_hBitmap = NULL ;
m_bytesPerRow = GetBestBytesPerRow( w * 4 ) ;
size_t size = m_bytesPerRow * h ;
m_bytesPerRow = GetBestBytesPerRow( m_width * 4 ) ;
size_t size = m_bytesPerRow * m_height ;
void* data = m_memBuf.GetWriteBuf( size ) ;
if (data != NULL)
{