From f73cd00f01d269b0bc549578bba988169e5872cc Mon Sep 17 00:00:00 2001 From: Robin Dunn Date: Fri, 9 Jun 2006 23:28:28 +0000 Subject: [PATCH] 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 --- src/mac/carbon/bitmap.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) 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 ; -- 2.50.0