mirror of
https://github.com/gnustep/libs-gui.git
synced 2025-04-23 15:11:37 +00:00
check that the array of reps is populated, not just non-nil
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@33786 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
parent
e14b034d8d
commit
4e0e32caac
2 changed files with 7 additions and 2 deletions
|
@ -1,3 +1,8 @@
|
|||
2011-08-25 Riccardo Mottola <rm@gnu.org>
|
||||
|
||||
* Source/NSImage.m ( _loadFromFile):
|
||||
Check that the array of reps is populated, not just non-nil.
|
||||
|
||||
2011-08-20 Eric Wasylishen <ewasylishen@gmail.com>
|
||||
|
||||
* Source/NSImage.m (-setSize:): Don't invalidate the cache anymore,
|
||||
|
|
|
@ -1891,10 +1891,10 @@ iterate_reps_for_types(NSArray* imageReps, SEL method)
|
|||
NSArray *array;
|
||||
|
||||
array = [NSImageRep imageRepsWithContentsOfFile: fileName];
|
||||
if (array)
|
||||
if (array || ([array count] > 0))
|
||||
[self addRepresentations: array];
|
||||
|
||||
return (array) ? YES : NO;
|
||||
return (array || ([array count] > 0)) ? YES : NO;
|
||||
}
|
||||
|
||||
- (BOOL) _useFromFile: (NSString *)fileName
|
||||
|
|
Loading…
Reference in a new issue