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:
parent
e846dd57d7
commit
795160b7f6
@ -287,8 +287,8 @@ bool wxBitmapRefData::Create( int w , int h , int d )
|
|||||||
m_depth = d ;
|
m_depth = d ;
|
||||||
m_hBitmap = NULL ;
|
m_hBitmap = NULL ;
|
||||||
|
|
||||||
m_bytesPerRow = GetBestBytesPerRow( w * 4 ) ;
|
m_bytesPerRow = GetBestBytesPerRow( m_width * 4 ) ;
|
||||||
size_t size = m_bytesPerRow * h ;
|
size_t size = m_bytesPerRow * m_height ;
|
||||||
void* data = m_memBuf.GetWriteBuf( size ) ;
|
void* data = m_memBuf.GetWriteBuf( size ) ;
|
||||||
if ( data != NULL )
|
if ( data != NULL )
|
||||||
{
|
{
|
||||||
|
Loading…
Reference in New Issue
Block a user