]> git.saurik.com Git - wxWidgets.git/blobdiff - src/cocoa/dcmemory.mm
fix MinGW/gcc compilation issue
[wxWidgets.git] / src / cocoa / dcmemory.mm
index fb11593b35d9c60cd869eda171f73b93157ff561..0f2f04c365e862307df8a0f9e2c9396cc0b6fc1b 100644 (file)
@@ -53,7 +53,10 @@ bool wxMemoryDC::CocoaLockFocus()
     {
         [m_cocoaNSImage lockFocus];
         sm_cocoaDCStack.Insert(this);
-        m_cocoaWxToBoundsTransform = CocoaGetWxToBoundsTransform([m_cocoaNSImage isFlipped], [m_cocoaNSImage size].height);
+        NSAffineTransform *newTransform = CocoaGetWxToBoundsTransform([m_cocoaNSImage isFlipped], [m_cocoaNSImage size].height);
+        [newTransform retain];
+        [m_cocoaWxToBoundsTransform release];
+        m_cocoaWxToBoundsTransform = newTransform;
         CocoaApplyTransformations();
         return true;
     }