mirror of
https://github.com/gnustep/libs-gui.git
synced 2025-04-23 07:00:46 +00:00
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:
parent
e6719574e3
commit
4fae138790
2 changed files with 13 additions and 3 deletions
|
@ -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
|
||||
|
|
|
@ -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];
|
||||
|
|
Loading…
Reference in a new issue