* Source/NSImage.m (-bestRepresentationForDevice:): Fix last

change for the case where there are no representations for the
image.


git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@34168 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
Fred Kiefer 2011-11-13 19:24:17 +00:00
parent 7b7ec00dba
commit eaafb6754d
2 changed files with 15 additions and 1 deletions

View file

@ -1,3 +1,8 @@
2011-11-13 Fred Kiefer <FredKiefer@gmx.de>
* Source/NSImage.m (-bestRepresentationForDevice:): Fix last
change for the case where there are no representations for the image.
2011-11-13 Fred Kiefer <FredKiefer@gmx.de>
* Source/NSUserDefaultsController.m

View file

@ -1502,7 +1502,16 @@ static NSSize GSResolutionOfImageRep(NSImageRep *rep)
}
}
}
return [reps objectAtIndex: 0];
if ([reps count] > 0)
{
return [reps objectAtIndex: 0];
}
else
{
return nil;
}
}
- (NSImageRep *) bestRepresentationForRect: (NSRect)rect