]> git.saurik.com Git - wxWidgets.git/blobdiff - src/os2/bitmap.cpp
wxUniversal fixes:
[wxWidgets.git] / src / os2 / bitmap.cpp
index 3b86f1c669577a4ee9151f12cd870ed9c8f1fd69..6a6be7033f60b6271c367570d395789e1606809b 100644 (file)
@@ -661,12 +661,20 @@ bool wxBitmap::CreateFromImage (
         // Have to do something similar to WIN32's StretchDIBits, use GpiBitBlt
         // in combination with setting the bits into the selected bitmap
         //
         // Have to do something similar to WIN32's StretchDIBits, use GpiBitBlt
         // in combination with setting the bits into the selected bitmap
         //
-        lScans = ::GpiSetBitmapBits( hPS
-                                    ,0             // Start at the bottom
-                                    ,(LONG)nHeight // One line per scan
-                                    ,(PBYTE)pucBits
-                                    ,&vInfo
-                                   );
+        if ((lScans = ::GpiSetBitmapBits( hPS
+                                         ,0             // Start at the bottom
+                                         ,(LONG)nHeight // One line per scan
+                                         ,(PBYTE)pucBits
+                                         ,&vInfo
+                                       )) == GPI_ALTERROR)
+        {
+            ERRORID                 vError;
+            wxString                sError;
+
+            vError = ::WinGetLastError(vHabmain);
+            sError = wxPMErrorToStr(vError);
+        }
+
         hPSScreen = ::GpiCreatePS( vHabmain
                                   ,hDCScreen
                                   ,&vSize
         hPSScreen = ::GpiCreatePS( vHabmain
                                   ,hDCScreen
                                   ,&vSize