* Source/NSApplication.m (-_openFiles): Protect agains empty arguments.

Patch by Luboš Doležel <lubos@dolezel.info>


git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@35785 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
Fred Kiefer 2012-11-05 22:10:07 +00:00
parent 65cac93a7b
commit e0e4395cd7
2 changed files with 13 additions and 4 deletions

View file

@ -1,3 +1,8 @@
2012-11-05 Fred Kiefer <FredKiefer@gmx.de>
* Source/NSApplication.m (-_openFiles): Protect agains empty arguments.
Patch by Luboš Doležel <lubos@dolezel.info>
2012-10-31 Fred Kiefer <FredKiefer@gmx.de>
* Source/NSTabView.m (-dealloc): Reset _selected to nil at top of dealloc.

View file

@ -4117,12 +4117,16 @@ struct _DelegateWrapper
NSString *file = nil;
[en nextObject]; // skip the first element, which is always empty...
while((file = [en nextObject]) != nil)
while ((file = [en nextObject]) != nil)
{
unichar c = [file characterAtIndex: 0];
if(c != '-')
if ([file length] == 0)
{
continue;
}
if ([file characterAtIndex: 0] != '-')
{
if(files == nil)
if (files == nil)
{
files = [NSMutableArray array];
}