From 81a8907f45aa85cd1e03274bb6fa8cc0c31f14d9 Mon Sep 17 00:00:00 2001 From: fredkiefer Date: Fri, 13 Nov 2009 07:51:58 +0000 Subject: [PATCH] Fix small bug in last commit. git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@28996 72102866-910b-0410-8b05-ffd578937521 --- ChangeLog | 5 +++++ Source/NSImage.m | 4 ++-- 2 files changed, 7 insertions(+), 2 deletions(-) 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;