]> git.saurik.com Git - wxWidgets.git/blobdiff - src/os2/bitmap.cpp
A few tweaks and cleanups
[wxWidgets.git] / src / os2 / bitmap.cpp
index 1ca4781c1d2a54a25af34da727883dd9b0ba0132..53a1a01dc941bc3b52bf027ce9c865a216171f63 100644 (file)
@@ -516,10 +516,11 @@ bool wxBitmap::CreateFromImage (
 )
 {
     wxCHECK_MSG(rImage.Ok(), FALSE, wxT("invalid image"));
+    m_refData = new wxBitmapRefData();
 
     int                             nSizeLimit = 1024 * 768 * 3;
-    int                             nWidth = GetWidth();
-    int                             nBmpHeight = GetHeight();
+    int                             nWidth = rImage.GetWidth();
+    int                             nBmpHeight = rImage.GetHeight();
     int                             nBytePerLine = nWidth * 3;
     int                             nSizeDWORD = sizeof(DWORD);
     int                             nLineBoundary = nBytePerLine % nSizeDWORD;