don't return garbage from GetRawBitmap
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@20198 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
parent
98ea6b7d6a
commit
cc37ebe090
@ -1181,7 +1181,7 @@ bool wxBitmap::GetRawData(wxRawBitmapData *data)
|
||||
|
||||
// we only support raw access to the DIBs, so check if we have one
|
||||
DIBSECTION ds;
|
||||
if ( !::GetObject(GetHbitmap(), sizeof(ds), &ds) )
|
||||
if ( ::GetObject(GetHbitmap(), sizeof(ds), &ds) != sizeof(DIBSECTION) )
|
||||
{
|
||||
return FALSE;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user