X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/3e21fc053d9017f79ad71675db8d2e1497049159..48f625bc2ce81132a2a8c2d7c524a03f1b7196e5:/src/cocoa/dcmemory.mm diff --git a/src/cocoa/dcmemory.mm b/src/cocoa/dcmemory.mm index fb11593b35..0f2f04c365 100644 --- a/src/cocoa/dcmemory.mm +++ b/src/cocoa/dcmemory.mm @@ -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; }