better surviving 0 width / height bitmap sizes

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@61409 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Stefan Csomor 2009-07-12 08:24:53 +00:00
parent e846dd57d7
commit 795160b7f6

View File

@ -287,8 +287,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 )
{