X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/65608e3bb0a1efea84af1aafbf3e05a05285766e..6d5e73073039ed49d1b19649e14e5e18ba1a599f:/src/mac/bitmap.cpp diff --git a/src/mac/bitmap.cpp b/src/mac/bitmap.cpp index 6fdfdbc909..9e47fe6728 100644 --- a/src/mac/bitmap.cpp +++ b/src/mac/bitmap.cpp @@ -201,6 +201,7 @@ wxBitmapRefData::wxBitmapRefData() m_bitmapMask = NULL; m_hBitmap = NULL ; m_hPict = NULL ; + m_hIcon = NULL ; m_bitmapType = kMacBitmapTypeUnknownType ; } @@ -226,6 +227,13 @@ wxBitmapRefData::~wxBitmapRefData() } } break ; + case kMacBitmapTypeIcon : + if ( m_hIcon ) + { + DisposeCIcon( m_hIcon ) ; + m_hIcon = NULL ; + } + default : // unkown type ? break ; @@ -488,7 +496,7 @@ void wxBitmap::SetHBITMAP(WXHBITMAP bmp) { M_BITMAPDATA->m_bitmapType = kMacBitmapTypeGrafWorld ; M_BITMAPDATA->m_hBitmap = bmp ; - M_BITMAPDATA->m_ok = (M_BITMAPDATA->m_hBitmap != NULL ) ; + M_BITMAPDATA->m_ok = (M_BITMAPDATA->m_hBitmap != NULL ) ; } bool wxBitmap::LoadFile(const wxString& filename, long type) @@ -584,7 +592,7 @@ wxBitmap::wxBitmap(const wxImage& image, int depth) // Create mask if ( image.HasMask() ) { -// SetMask(new wxMask( maskBitmap )); + SetMask(new wxMask( maskBitmap )); } UnlockPixels( GetGWorldPixMap(GetHBITMAP()) );