]> git.saurik.com Git - wxWidgets.git/commitdiff
Prevent assert and crash if an attempt is made to make a bitmap with
authorRobin Dunn <robin@alldunn.com>
Fri, 9 Jun 2006 23:28:28 +0000 (23:28 +0000)
committerRobin Dunn <robin@alldunn.com>
Fri, 9 Jun 2006 23:28:28 +0000 (23:28 +0000)
dimensions < 1

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@39658 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775

src/mac/carbon/bitmap.cpp

index 8bc85846cc7187d838bb75b8a9ac51b903760ecb..e2b19004cc524812615518b434c5e9d9eedda4b7 100644 (file)
@@ -165,8 +165,8 @@ wxBitmapRefData::wxBitmapRefData( int w , int h , int d )
 
 bool wxBitmapRefData::Create( int w , int h , int d )
 {
-    m_width = w ;
-    m_height = ;
+    m_width = wxMax(1, w);
+    m_height = wxMax(1, h);
     m_depth = d ;
 
     m_bytesPerRow = w * 4 ;