diff --git a/ChangeLog b/ChangeLog index 58b4bd08d..c487f321c 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,8 @@ +2009-11-12 Fred Kiefer + + * Source/NSImage.m (-copyWithZone:): Set the name of the copy to + nil, not that of the original image. + 2009-11-12 Richard Frith-Macdonald * Source/NSImage.m: fixup copy/dealloc handling of named images diff --git a/Source/NSImage.m b/Source/NSImage.m index e33e3994d..b9f4ebb70 100644 --- a/Source/NSImage.m +++ b/Source/NSImage.m @@ -432,7 +432,7 @@ repd_for_rep(NSArray *_reps, NSImageRep *rep) return self; } -- (id)initWithContentsOfURL:(NSURL *)anURL +- (id) initWithContentsOfURL: (NSURL *)anURL { NSArray *array = [NSImageRep imageRepsWithContentsOfURL: anURL]; @@ -503,7 +503,7 @@ repd_for_rep(NSArray *_reps, NSImageRep *rep) copy = (NSImage*)NSCopyObject (self, 0, zone); - _name = nil; + copy->_name = nil; RETAIN(_fileName); RETAIN(_color); copy->_lockedView = nil;