X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/923d28da0eed674dfd7f4a497568ac14a29f0189..f8a139493553049e0b92db4bbee11deb33093ee3:/src/mac/carbon/bitmap.cpp diff --git a/src/mac/carbon/bitmap.cpp b/src/mac/carbon/bitmap.cpp index 8bc85846cc..4b2a1526b4 100644 --- a/src/mac/carbon/bitmap.cpp +++ b/src/mac/carbon/bitmap.cpp @@ -17,9 +17,9 @@ #include "wx/log.h" #include "wx/dcmemory.h" #include "wx/icon.h" + #include "wx/image.h" #endif -#include "wx/image.h" #include "wx/metafile.h" #include "wx/xpmdecod.h" @@ -165,8 +165,8 @@ wxBitmapRefData::wxBitmapRefData( int w , int h , int d ) bool wxBitmapRefData::Create( int w , int h , int d ) { - m_width = w ; - m_height = h ; + m_width = wxMax(1, w); + m_height = wxMax(1, h); m_depth = d ; m_bytesPerRow = w * 4 ; @@ -397,7 +397,7 @@ IconRef wxBitmapRefData::GetIconRef() SetIconFamilyData( iconFamily, 'PICT' , (Handle) pic ) ; } // transform into IconRef -#ifdef __WXMAC_OSX__ +#if defined( __WXMAC_OSX__ ) && MAC_OS_X_VERSION_MAX_ALLOWED > MAC_OS_X_VERSION_10_2 // cleaner version existing from 10.3 upwards HLock((Handle) iconFamily); OSStatus err = GetIconRefFromIconFamilyPtr( *iconFamily, GetHandleSize((Handle) iconFamily), &m_iconRef );