From 795160b7f64e8e70e90e1ad49689e6af280ab5f1 Mon Sep 17 00:00:00 2001 From: Stefan Csomor Date: Sun, 12 Jul 2009 08:24:53 +0000 Subject: [PATCH] better surviving 0 width / height bitmap sizes git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@61409 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- src/osx/core/bitmap.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) 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 ) {