in -_extIconForApp, check filename not empty string before passing to bundle method (which raises an exception)

git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@21005 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
arobert 2005-03-30 03:13:43 +00:00
parent 77cc0f448d
commit 55d79a2b59
2 changed files with 7 additions and 2 deletions

View file

@ -1645,7 +1645,7 @@ inFileViewerRootedAtPath: (NSString*)rootFullpath
NSDictionary *typeInfo = [extInfo objectForKey: appName];
NSString *file = [typeInfo objectForKey: @"NSIcon"];
if (file)
if (file && [file length] != 0)
{
if ([file isAbsolutePath] == NO)
{
@ -1673,7 +1673,7 @@ inFileViewerRootedAtPath: (NSString*)rootFullpath
return nil;
}
/** Returns the default icon to display for a directory */
/** Returns the default icon to display for a file */
- (NSImage*) unknownFiletypeImage
{
static NSImage *image = nil;