mirror of
https://github.com/cappuccino/cappuccino.git
synced 2026-08-25 04:57:03 +00:00
Fixed: CPImage -size returned internal object ref
Previously, CPImage -size returned a reference to the internal _size object, which allowed the caller to directly change _size. In Cocoa a copy of the size is returned. This commit returns a copy of _size to ensure no unwanted side effects.
This commit is contained in:
+1
-1
@@ -275,7 +275,7 @@ function CPAppKitImage(aFilename, aSize)
|
||||
*/
|
||||
- (CGSize)size
|
||||
{
|
||||
return _size;
|
||||
return CGSizeMakeCopy(_size);
|
||||
}
|
||||
|
||||
+ (id)imageNamed:(CPString)aName
|
||||
|
||||
Reference in New Issue
Block a user