From: Robin Dunn Date: Fri, 9 Jun 2006 23:28:28 +0000 (+0000) Subject: Prevent assert and crash if an attempt is made to make a bitmap with X-Git-Url: https://git.saurik.com/wxWidgets.git/commitdiff_plain/f73cd00f01d269b0bc549578bba988169e5872cc?ds=sidebyside Prevent assert and crash if an attempt is made to make a bitmap with dimensions < 1 git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@39658 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- diff --git a/src/mac/carbon/bitmap.cpp b/src/mac/carbon/bitmap.cpp index 8bc85846cc..e2b19004cc 100644 --- a/src/mac/carbon/bitmap.cpp +++ b/src/mac/carbon/bitmap.cpp @@ -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 = h ; + m_width = wxMax(1, w); + m_height = wxMax(1, h); m_depth = d ; m_bytesPerRow = w * 4 ;