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
This commit is contained in:
@@ -135,7 +135,7 @@ void wxBitmapRefData::Init()
|
|||||||
m_depth = 0 ;
|
m_depth = 0 ;
|
||||||
m_ok = false ;
|
m_ok = false ;
|
||||||
m_bitmapMask = NULL ;
|
m_bitmapMask = NULL ;
|
||||||
#if wxMAC_USE_CORE_GRAPHICS
|
#ifdef __WXMAC_OSX__
|
||||||
m_cgImageRef = NULL ;
|
m_cgImageRef = NULL ;
|
||||||
#endif
|
#endif
|
||||||
m_iconRef = NULL ;
|
m_iconRef = NULL ;
|
||||||
@@ -228,7 +228,7 @@ void *wxBitmapRefData::BeginRawAccess()
|
|||||||
// the bitmap data may change now
|
// the bitmap data may change now
|
||||||
wxASSERT_MSG( m_pictHandle == NULL && m_iconRef == NULL ,
|
wxASSERT_MSG( m_pictHandle == NULL && m_iconRef == NULL ,
|
||||||
wxT("Currently, modifing bitmaps that are used in controls already is not supported") ) ;
|
wxT("Currently, modifing bitmaps that are used in controls already is not supported") ) ;
|
||||||
#if wxMAC_USE_CORE_GRAPHICS
|
#ifdef __WXMAC_OSX__
|
||||||
if ( m_cgImageRef )
|
if ( m_cgImageRef )
|
||||||
{
|
{
|
||||||
CGImageRelease( m_cgImageRef ) ;
|
CGImageRelease( m_cgImageRef ) ;
|
||||||
@@ -592,7 +592,7 @@ void wxBitmapRefData::Free()
|
|||||||
{
|
{
|
||||||
wxASSERT_MSG( m_rawAccessCount == 0 , wxT("Bitmap still selected when destroyed") ) ;
|
wxASSERT_MSG( m_rawAccessCount == 0 , wxT("Bitmap still selected when destroyed") ) ;
|
||||||
|
|
||||||
#if wxMAC_USE_CORE_GRAPHICS
|
#ifdef __WXMAC_OSX__
|
||||||
if ( m_cgImageRef )
|
if ( m_cgImageRef )
|
||||||
{
|
{
|
||||||
CGImageRelease( m_cgImageRef ) ;
|
CGImageRelease( m_cgImageRef ) ;
|
||||||
|
Reference in New Issue
Block a user