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
This commit is contained in:
parent
0e9c99232f
commit
f73cd00f01
@ -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 ;
|
||||
|
Loading…
Reference in New Issue
Block a user