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:
parent
1c5e12589c
commit
abb4f9c937
@ -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 ) ;
|
||||
|
Loading…
Reference in New Issue
Block a user