X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/902725eefee5a402d21d13b2630583ab28ae3931..6ac23e25b85468c7885f6ab43ca0a45f6458af2e:/src/mac/carbon/bitmap.cpp?ds=sidebyside diff --git a/src/mac/carbon/bitmap.cpp b/src/mac/carbon/bitmap.cpp index 12ade3f74a..0359fd6090 100644 --- a/src/mac/carbon/bitmap.cpp +++ b/src/mac/carbon/bitmap.cpp @@ -146,7 +146,7 @@ void wxBitmapRefData::Init() m_pictHandle = NULL ; m_hBitmap = NULL ; m_hMaskBitmap = NULL; - m_maskBytesPerRow = NULL ; + m_maskBytesPerRow = 0 ; m_rawAccessCount = 0 ; m_hasAlpha = false; @@ -271,9 +271,14 @@ IconRef wxBitmapRefData::GetIconRef() IconFamilyHandle iconFamily = NULL ; +#ifdef WORDS_BIGENDIAN iconFamily = (IconFamilyHandle) NewHandle(8) ; (**iconFamily).resourceType = kIconFamilyType ; (**iconFamily).resourceSize = sizeof(OSType) + sizeof(Size); +#else + // test this solution on big endian as well + iconFamily = (IconFamilyHandle) NewHandle(0) ; +#endif int w = GetWidth() ; int h = GetHeight() ; @@ -959,7 +964,7 @@ wxBitmap::wxBitmap(const wxImage& image, int depth) int width = image.GetWidth(); int height = image.GetHeight(); - m_refData = new wxBitmapRefData( width , height , depth ) ;; + m_refData = new wxBitmapRefData( width , height , depth ) ; // Create picture