Correct last commit to use && instead of ||.

git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@33788 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
Fred Kiefer 2011-08-26 07:35:41 +00:00
parent 4e0e32caac
commit 5554634f9c
2 changed files with 10 additions and 3 deletions

View file

@ -1,3 +1,8 @@
2011-08-26 Fred Kiefer <FredKiefer@gmx.de>
* Source/NSImage.m ( _loadFromFile): Correct last commit.
* Source/NSImage.m ( _loadFromData): Use similar check here.
2011-08-25 Riccardo Mottola <rm@gnu.org>
* Source/NSImage.m ( _loadFromFile):

View file

@ -1870,14 +1870,16 @@ iterate_reps_for_types(NSArray* imageReps, SEL method)
if (rep && [rep respondsToSelector: @selector(imageRepsWithData:)])
{
NSArray* array;
array = [rep imageRepsWithData: data];
if (array)
if (array && ([array count] > 0))
ok = YES;
[self addRepresentations: array];
}
else if (rep)
{
NSImageRep* image;
image = [rep imageRepWithData: data];
if (image)
ok = YES;
@ -1891,10 +1893,10 @@ iterate_reps_for_types(NSArray* imageReps, SEL method)
NSArray *array;
array = [NSImageRep imageRepsWithContentsOfFile: fileName];
if (array || ([array count] > 0))
if (array)
[self addRepresentations: array];
return (array || ([array count] > 0)) ? YES : NO;
return (array && ([array count] > 0)) ? YES : NO;
}
- (BOOL) _useFromFile: (NSString *)fileName