]> git.saurik.com Git - wxWidgets.git/commitdiff
better surviving 0 width / height bitmap sizes
authorStefan Csomor <csomor@advancedconcepts.ch>
Sun, 12 Jul 2009 08:24:53 +0000 (08:24 +0000)
committerStefan Csomor <csomor@advancedconcepts.ch>
Sun, 12 Jul 2009 08:24:53 +0000 (08:24 +0000)
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@61409 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775

src/osx/core/bitmap.cpp

index 86df441f9da7d6a90d176016425d9e56908aabd7..a2f766043501e896312bd65b3bcf33e7c2852d10 100644 (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 )
     {