Protect against the app icon being nil. Should fix #25620.

git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@27912 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
Fred Kiefer 2009-02-18 08:57:22 +00:00
parent e6719574e3
commit 4fae138790
2 changed files with 13 additions and 3 deletions

View file

@ -1,3 +1,8 @@
2009-02-18 Fred Kiefer <FredKiefer@gmx.de>
* Source/NSApplication.m (NSAppIconView-setImage:): Protect
against the item being nil.
2009-02-18 02:45-EST Gregory John Casamento <greg_casamento@yahoo.com>
* Source/GSNibLoading.m: Rollback of previous change. Found a

View file

@ -641,9 +641,14 @@ static NSSize scaledIconSizeForSize(NSSize imageSize)
- (void) setImage: (NSImage *)anImage
{
NSImage *imgCopy = [anImage copy];
NSSize imageSize = [imgCopy size];
[imgCopy setScalesWhenResized: YES];
[imgCopy setSize: scaledIconSizeForSize(imageSize)];
if (imgCopy)
{
NSSize imageSize = [imgCopy size];
[imgCopy setScalesWhenResized: YES];
[imgCopy setSize: scaledIconSizeForSize(imageSize)];
}
[dragCell setImage: imgCopy];
RELEASE(imgCopy);
[self setNeedsDisplay: YES];