don't attempt to create 0*0 bitmaps in GetBuffer() (patch 1899643)
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_2_8_BRANCH@52152 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
@@ -53,6 +53,14 @@ public:
|
|||||||
h > ms_buffer->GetHeight() )
|
h > ms_buffer->GetHeight() )
|
||||||
{
|
{
|
||||||
delete ms_buffer;
|
delete ms_buffer;
|
||||||
|
|
||||||
|
// we must always return a valid bitmap but creating a bitmap of
|
||||||
|
// size 0 would fail, so create a 1*1 bitmap in this case
|
||||||
|
if ( !w )
|
||||||
|
w = 1;
|
||||||
|
if ( !h )
|
||||||
|
h = 1;
|
||||||
|
|
||||||
ms_buffer = new wxBitmap(w, h);
|
ms_buffer = new wxBitmap(w, h);
|
||||||
}
|
}
|
||||||
return ms_buffer;
|
return ms_buffer;
|
||||||
|
Reference in New Issue
Block a user