ConvertToImage: Check !Ok() (we may not have any ref data at all) and if
the bitmap is not okay return wxNullImage (instead of a dummy 5x5 image) git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@25409 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
parent
7bb70733bb
commit
f8c10ed8b3
@ -362,8 +362,8 @@ wxBitmap wxBitmap::GetSubBitmap(wxRect const&) const
|
||||
|
||||
wxImage wxBitmap::ConvertToImage() const
|
||||
{
|
||||
if(!M_BITMAPDATA->m_ok)
|
||||
return wxImage(5,5)/*wxNullImage*/;
|
||||
if(!Ok())
|
||||
return /*wxImage(5,5)*/wxNullImage;
|
||||
return wxImage(M_BITMAPDATA->m_width,M_BITMAPDATA->m_height);
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user