From: Stefan Csomor Date: Sat, 3 Dec 2005 07:58:16 +0000 (+0000) Subject: correcting CGImage handling to be always correctly initialized and freed on OSX build... X-Git-Url: https://git.saurik.com/wxWidgets.git/commitdiff_plain/abb4f9c93715f5b00c526203af96ed2938a1a2c3?ds=sidebyside correcting CGImage handling to be always correctly initialized and freed on OSX builds, even when not using CoreGraphics, Ryan's Patch 1372209 git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@36333 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- diff --git a/src/mac/carbon/bitmap.cpp b/src/mac/carbon/bitmap.cpp index 1e84d4f2c3..89f7b3496c 100644 --- a/src/mac/carbon/bitmap.cpp +++ b/src/mac/carbon/bitmap.cpp @@ -135,7 +135,7 @@ void wxBitmapRefData::Init() m_depth = 0 ; m_ok = false ; m_bitmapMask = NULL ; -#if wxMAC_USE_CORE_GRAPHICS +#ifdef __WXMAC_OSX__ m_cgImageRef = NULL ; #endif m_iconRef = NULL ; @@ -228,7 +228,7 @@ void *wxBitmapRefData::BeginRawAccess() // the bitmap data may change now wxASSERT_MSG( m_pictHandle == NULL && m_iconRef == NULL , wxT("Currently, modifing bitmaps that are used in controls already is not supported") ) ; -#if wxMAC_USE_CORE_GRAPHICS +#ifdef __WXMAC_OSX__ if ( m_cgImageRef ) { CGImageRelease( m_cgImageRef ) ; @@ -592,7 +592,7 @@ void wxBitmapRefData::Free() { wxASSERT_MSG( m_rawAccessCount == 0 , wxT("Bitmap still selected when destroyed") ) ; -#if wxMAC_USE_CORE_GRAPHICS +#ifdef __WXMAC_OSX__ if ( m_cgImageRef ) { CGImageRelease( m_cgImageRef ) ;