X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/4bea628d007cc8add79e6dee2863c7bdc1bccce5..fb4b0165b22fef2c47e97e90ef5257ca8eadc804:/src/osx/core/bitmap.cpp diff --git a/src/osx/core/bitmap.cpp b/src/osx/core/bitmap.cpp index 86df441f9d..a2f7660435 100644 --- a/src/osx/core/bitmap.cpp +++ b/src/osx/core/bitmap.cpp @@ -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 ) {