X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/96dabe431382e288fc1ccc561f62c400895ac0fa..df7d93f67bae4a7598dc7058f90f35acb7bd584a:/src/osx/core/dcmemory.cpp diff --git a/src/osx/core/dcmemory.cpp b/src/osx/core/dcmemory.cpp index a21782eaae..9610395377 100644 --- a/src/osx/core/dcmemory.cpp +++ b/src/osx/core/dcmemory.cpp @@ -58,8 +58,7 @@ wxMemoryDCImpl::~wxMemoryDCImpl() if ( m_selected.Ok() ) { m_selected.EndRawAccess() ; - delete m_graphicContext ; - m_graphicContext = NULL ; + wxDELETE(m_graphicContext); } } @@ -68,8 +67,7 @@ void wxMemoryDCImpl::DoSelect( const wxBitmap& bitmap ) if ( m_selected.Ok() ) { m_selected.EndRawAccess() ; - delete m_graphicContext ; - m_graphicContext = NULL ; + wxDELETE(m_graphicContext); } m_selected = bitmap; @@ -78,8 +76,8 @@ void wxMemoryDCImpl::DoSelect( const wxBitmap& bitmap ) if ( m_selected.GetDepth() != 1 ) m_selected.UseAlpha() ; m_selected.BeginRawAccess() ; - m_width = bitmap.GetWidth(); - m_height = bitmap.GetHeight(); + m_width = bitmap.GetWidth(); + m_height = bitmap.GetHeight(); CGColorSpaceRef genericColorSpace = wxMacGetGenericRGBColorSpace(); CGContextRef bmCtx = (CGContextRef) m_selected.GetHBITMAP(); @@ -87,7 +85,7 @@ void wxMemoryDCImpl::DoSelect( const wxBitmap& bitmap ) { CGContextSetFillColorSpace( bmCtx, genericColorSpace ); CGContextSetStrokeColorSpace( bmCtx, genericColorSpace ); - SetGraphicsContext( wxGraphicsContext::CreateFromNative( bmCtx ) ); + SetGraphicsContext( wxGraphicsContext::CreateFromNative( bmCtx ) ); } m_ok = (m_graphicContext != NULL) ; }