mirror of
https://github.com/gnustep/libs-gui.git
synced 2025-05-31 19:50:48 +00:00
cope with bad data
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@26526 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
parent
a28640077e
commit
7d18cf6aad
2 changed files with 20 additions and 2 deletions
|
@ -1,3 +1,7 @@
|
||||||
|
2008-05-14 Richard Frith-Macdonald <rfm@gnu.org>
|
||||||
|
|
||||||
|
* Source/NSDocumentController.m: Cope with bad values in NSRecentItems
|
||||||
|
|
||||||
2008-05-13 Fred Kiefer <FredKiefer@gmx.de>
|
2008-05-13 Fred Kiefer <FredKiefer@gmx.de>
|
||||||
|
|
||||||
* Headers/AppKit/NSGlyphGenerator.h,
|
* Headers/AppKit/NSGlyphGenerator.h,
|
||||||
|
|
|
@ -177,13 +177,27 @@ static NSDictionary *TypeInfoForHumanReadableName (NSArray *types, NSString *typ
|
||||||
if (_recent_documents)
|
if (_recent_documents)
|
||||||
{
|
{
|
||||||
int i, count;
|
int i, count;
|
||||||
|
|
||||||
_recent_documents = [_recent_documents mutableCopy];
|
_recent_documents = [_recent_documents mutableCopy];
|
||||||
count = [_recent_documents count];
|
count = [_recent_documents count];
|
||||||
for (i = 0; i < count; i++)
|
for (i = 0; i < count; i++)
|
||||||
{
|
{
|
||||||
|
NSString *str;
|
||||||
NSURL *url;
|
NSURL *url;
|
||||||
url = [NSURL URLWithString: [_recent_documents objectAtIndex: i]];
|
|
||||||
[_recent_documents replaceObjectAtIndex: i withObject: url];
|
str = [_recent_documents objectAtIndex: i];
|
||||||
|
url = [NSURL URLWithString: str];
|
||||||
|
if (url == nil)
|
||||||
|
{
|
||||||
|
NSLog(@"NSRecentItems value '%@' is not valid ... ignored", str);
|
||||||
|
[_recent_documents removeObjectAtIndex: i];
|
||||||
|
i--;
|
||||||
|
count--;
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
[_recent_documents replaceObjectAtIndex: i withObject: url];
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue