Small changes found by static analyser.

git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@32434 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
Fred Kiefer 2011-03-02 21:30:18 +00:00
parent edb6aa47ee
commit 3b0c5dfe24
3 changed files with 9 additions and 11 deletions

View file

@ -1,3 +1,10 @@
2011-03-02 Fred Kiefer <FredKiefer@gmx.de>
* Source/NSImage.m: Remove the -awakeAfterUsingCoder: method as
this method was incorrectly implemented and
* Source/NSTextAttachment.m (NSTextAttachmentCell-setAttachment:):
Release the created icon after setting it as image.
2011-02-28 Richard Frith-Macdonald <rfm@gnu.org>
* Source/NSBitmapImageRep.m:

View file

@ -1823,16 +1823,6 @@ Fallback for backends other than Cairo. */
return self;
}
- (id) awakeAfterUsingCoder: (NSCoder*)aDecoder
{
if (_name && [nameDict objectForKey: _name])
{
return [nameDict objectForKey: _name];
}
return self;
}
+ (BOOL) canInitWithPasteboard: (NSPasteboard *)pasteboard
{
int i, count;

View file

@ -251,9 +251,10 @@
icon = [[NSImage alloc] initByReferencingFile: fileName];
}
if (icon == nil)
icon = [fileWrap icon];
icon = RETAIN([fileWrap icon]);
[self setImage: icon];
RELEASE(icon);
}
}