]> git.saurik.com Git - wxWidgets.git/blobdiff - src/mac/carbon/dcclient.cpp
define wxTC_MULTILINE explicitly as wxNB_MULTILINE is not necessarily defined where...
[wxWidgets.git] / src / mac / carbon / dcclient.cpp
index 7023f8cc9f237e3ab49a57e2c7a1e58b9f458e4a..3fab6f98e2eba9430d4b4f8436e37f505e39ca3e 100644 (file)
@@ -165,11 +165,12 @@ wxWindowDC::wxWindowDC(wxWindow *window)
 wxWindowDC::~wxWindowDC()
 {
 #if wxMAC_USE_CORE_GRAPHICS
-    if ( m_release && m_graphicContext )
+    if ( m_release )
     {
+        // this must not necessarily be the current context, we must restore the state of the
+        // cg we started with above (before the CGContextTranslateCTM call)
         CGContextRef cg = (CGContextRef) m_window->MacGetCGContextRef();
         CGContextRestoreGState(cg);
-        //CGContextRef cg = (CGContextRef) m_graphicContext->GetNativeContext() ;
     }
 #endif
 }