X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/3e21fc053d9017f79ad71675db8d2e1497049159..61e6a2ab5e3e1de051c3db492219627c368141f1:/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; }