]> git.saurik.com Git - wxWidgets.git/blobdiff - src/mac/bitmap.cpp
regenerated all make/project files to include selstore.cpp/.h
[wxWidgets.git] / src / mac / bitmap.cpp
index 7d2223a0e298dccf2766d20921eac56893d498e6..be836afd232c72d0276dfc421425175f8785188b 100644 (file)
@@ -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) )
    {
@@ -1380,7 +1377,9 @@ void wxBitmap::UngetRawData(wxPixelDataBase& data)
     GWorldPtr gworld = MAC_WXHBITMAP(M_BITMAPDATA->m_hBitmap);
     PixMapHandle hPixMap = GetGWorldPixMap(gworld);
     if ( hPixMap )
+    {
         UnlockPixels(hPixMap);
+    }
 }
 
 void wxBitmap::UseAlpha()