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:
Vadim Zeitlin
2003-04-13 15:58:47 +00:00
parent 98ea6b7d6a
commit cc37ebe090

View File

@@ -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;
} }