X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/3437f881c4270fc52365b507100f36afe837aee5..19e30148e18cc99296b26503c155e5cef59045f4:/src/os2/bitmap.cpp diff --git a/src/os2/bitmap.cpp b/src/os2/bitmap.cpp index 1ca4781c1d..53a1a01dc9 100644 --- a/src/os2/bitmap.cpp +++ b/src/os2/bitmap.cpp @@ -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;