X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/20b6985553b4e01e7960847e3211d940aeff8742..b9efe021b554fa3967d1442cf758435c5cd5ae8f:/src/mac/carbon/dcmemory.cpp diff --git a/src/mac/carbon/dcmemory.cpp b/src/mac/carbon/dcmemory.cpp index 7fb6a99482..a1f563080a 100644 --- a/src/mac/carbon/dcmemory.cpp +++ b/src/mac/carbon/dcmemory.cpp @@ -52,7 +52,7 @@ wxMemoryDC::~wxMemoryDC() { #if wxMAC_USE_CORE_GRAPHICS m_selected.EndRawAccess() ; - CGContextRef bmCtx = dynamic_cast(m_graphicContext)->GetNativeContext() ; + CGContextRef bmCtx = ((wxMacCGContext*)(m_graphicContext))->GetNativeContext() ; delete m_graphicContext ; m_graphicContext = NULL ; CGContextRelease( bmCtx ) ; @@ -68,7 +68,7 @@ void wxMemoryDC::SelectObject( const wxBitmap& bitmap ) { #if wxMAC_USE_CORE_GRAPHICS m_selected.EndRawAccess() ; - CGContextRef bmCtx = dynamic_cast(m_graphicContext)->GetNativeContext() ; + CGContextRef bmCtx = ((wxMacCGContext*)(m_graphicContext))->GetNativeContext() ; delete m_graphicContext ; m_graphicContext = NULL ; CGContextRelease( bmCtx ) ;