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:
@@ -1181,7 +1181,7 @@ bool wxBitmap::GetRawData(wxRawBitmapData *data)
|
|||||||
|
|
||||||
// we only support raw access to the DIBs, so check if we have one
|
// we only support raw access to the DIBs, so check if we have one
|
||||||
DIBSECTION ds;
|
DIBSECTION ds;
|
||||||
if ( !::GetObject(GetHbitmap(), sizeof(ds), &ds) )
|
if ( ::GetObject(GetHbitmap(), sizeof(ds), &ds) != sizeof(DIBSECTION) )
|
||||||
{
|
{
|
||||||
return FALSE;
|
return FALSE;
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user