Check for nil extension

git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@6610 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
Adam Fedor 2000-05-23 20:57:45 +00:00
parent ad1f921d27
commit e8770fc3fe
2 changed files with 6 additions and 0 deletions

View file

@ -1,3 +1,7 @@
2000-05-23 Adam Fedor <fedor@gnu.org>
* Source/NSImage.m ([NSImage +imageNamed:]): Check for nil extension.
2000-05-12 Georg Fleischmann 2000-05-12 Georg Fleischmann
* gui/Model/GMAppKit.m * gui/Model/GMAppKit.m

View file

@ -183,6 +183,8 @@ static Class cacheClass = 0;
NSString *the_name = aName; NSString *the_name = aName;
main_bundle = [NSBundle mainBundle]; main_bundle = [NSBundle mainBundle];
ext = [aName pathExtension]; ext = [aName pathExtension];
if (ext && [ext length] == 0)
ext = nil;
/* Check if extension is one of the image types */ /* Check if extension is one of the image types */
array = [self imageFileTypes]; array = [self imageFileTypes];