From 48b9f3198f4e679faf3dd34083dff3aabd6f93ae Mon Sep 17 00:00:00 2001 From: Aparajita Fishman Date: Fri, 30 Mar 2012 10:53:00 -0700 Subject: [PATCH] Methods that return CGPoint should always copy! --- AppKit/CPWindow/CPWindow.j | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/AppKit/CPWindow/CPWindow.j b/AppKit/CPWindow/CPWindow.j index d81ff5167..9beddc9de 100644 --- a/AppKit/CPWindow/CPWindow.j +++ b/AppKit/CPWindow/CPWindow.j @@ -2793,7 +2793,7 @@ var keyViewComparator = function(lhs, rhs, context) - (CGPoint)convertBaseToPlatformWindow:(CGPoint)aPoint { if ([self _sharesChromeWithPlatformWindow]) - return aPoint; + return _CGPointMakeCopy(aPoint); var origin = [self frame].origin; @@ -2801,12 +2801,12 @@ var keyViewComparator = function(lhs, rhs, context) } /*! - Converts aPoint from the parent platform window coordinate system to the windows coordinate system. + Converts aPoint from the parent platform window coordinate system to the window's coordinate system. */ - (CGPoint)convertPlatformWindowToBase:(CGPoint)aPoint { if ([self _sharesChromeWithPlatformWindow]) - return aPoint; + return _CGPointMakeCopy(aPoint); var origin = [self frame].origin;