Permalink
Browse files

Methods that return CGPoint should always copy!

  • Loading branch information...
1 parent 5893b33 commit 48b9f3198f4e679faf3dd34083dff3aabd6f93ae @aparajita aparajita committed Mar 30, 2012
Showing with 3 additions and 3 deletions.
  1. +3 −3 AppKit/CPWindow/CPWindow.j
@@ -2793,20 +2793,20 @@ var keyViewComparator = function(lhs, rhs, context)
- (CGPoint)convertBaseToPlatformWindow:(CGPoint)aPoint
{
if ([self _sharesChromeWithPlatformWindow])
- return aPoint;
+ return _CGPointMakeCopy(aPoint);
var origin = [self frame].origin;
return _CGPointMake(aPoint.x + origin.x, aPoint.y + origin.y);
}
/*!
- 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;

0 comments on commit 48b9f31

Please sign in to comment.