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:
Adrian Robert 2005-03-30 03:13:43 +00:00
parent f90da49627
commit 0f35cf0f7f
2 changed files with 7 additions and 2 deletions

View file

@ -1,3 +1,8 @@
2005-03-29 Adrian Robert <arobert@cogsci.ucsd.edu>
* Source/NSWorkspace.m (-_extIconForApp:info:): Check filename is
not empty string before passing to [NSBunder -pathForImageResource:].
2005-03-29 Adrian Robert <arobert@cogsci.ucsd.edu>
* Source/NSGraphicsContext.m: Undeprecate DPSxshow, DPSyshow,

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;