Consistently refuse to create bitmaps with 0 width or height.
Homogenize the behaviour of all ports when creating bitmaps with 0 width or height: just fail always as it doesn't seem to make sense to support this. Closes #16828. git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@78434 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
@@ -755,6 +755,8 @@ bool wxBitmap::DoCreate(int w, int h, int d, WXHDC hdc)
|
||||
{
|
||||
UnRef();
|
||||
|
||||
wxCHECK_MSG( w > 0 && h > 0, false, wxT("invalid bitmap size") );
|
||||
|
||||
m_refData = new wxBitmapRefData;
|
||||
|
||||
GetBitmapData()->m_width = w;
|
||||
|
Reference in New Issue
Block a user