X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/091c90b7cb1428a4ebd243a409fa52cbec40b8dd..11c084163e3702692586f70a9414dca97bb2a2d6:/src/mac/carbon/bitmap.cpp diff --git a/src/mac/carbon/bitmap.cpp b/src/mac/carbon/bitmap.cpp index 8918a44ae6..be836afd23 100644 --- a/src/mac/carbon/bitmap.cpp +++ b/src/mac/carbon/bitmap.cpp @@ -1349,14 +1349,11 @@ void *wxBitmap::GetRawData(wxPixelDataBase& data, int bpp) GWorldPtr gworld = MAC_WXHBITMAP(M_BITMAPDATA->m_hBitmap); PixMapHandle hPixMap = GetGWorldPixMap(gworld); - wxCHECK_MSG( hPixMap, NULL, _T("failed to get PixMap from GWorld?") ); + wxCHECK_MSG( hPixMap && *hPixMap, NULL, + _T("GetRawData(): failed to get PixMap from GWorld?") ); - if ( (*hPixMap)->pixelSize != bpp ) - { - wxFAIL_MSG( _T("bpp mismatch in GetRawData()") ); - - return NULL; - } + wxCHECK_MSG( (*hPixMap)->pixelSize == bpp, NULL, + _T("GetRawData(): pixel format mismatch") ); if ( !LockPixels(hPixMap) ) {