X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/03647350fc7cd141953c72e0284e928847d30f44..efa4bab2d1fc98b69d50a20759b5a6a26cef1f8d:/src/osx/core/dcmemory.cpp diff --git a/src/osx/core/dcmemory.cpp b/src/osx/core/dcmemory.cpp index 1debcb3c0e..eabdc34f98 100644 --- a/src/osx/core/dcmemory.cpp +++ b/src/osx/core/dcmemory.cpp @@ -55,25 +55,23 @@ void wxMemoryDCImpl::Init() wxMemoryDCImpl::~wxMemoryDCImpl() { - if ( m_selected.Ok() ) + if ( m_selected.IsOk() ) { m_selected.EndRawAccess() ; - delete m_graphicContext ; - m_graphicContext = NULL ; + wxDELETE(m_graphicContext); } } void wxMemoryDCImpl::DoSelect( const wxBitmap& bitmap ) { - if ( m_selected.Ok() ) + if ( m_selected.IsOk() ) { m_selected.EndRawAccess() ; - delete m_graphicContext ; - m_graphicContext = NULL ; + wxDELETE(m_graphicContext); } m_selected = bitmap; - if (m_selected.Ok()) + if (m_selected.IsOk()) { if ( m_selected.GetDepth() != 1 ) m_selected.UseAlpha() ; @@ -99,7 +97,7 @@ void wxMemoryDCImpl::DoSelect( const wxBitmap& bitmap ) void wxMemoryDCImpl::DoGetSize( int *width, int *height ) const { - if (m_selected.Ok()) + if (m_selected.IsOk()) { if (width) (*width) = m_selected.GetWidth();