mirror of
https://github.com/sparkle-project/Sparkle
synced 2026-11-26 04:57:54 +00:00
Fixes 240274
Sparkle no longer crashes when the appcast contains an enclosure with no URL (or if there's any other exception in appcast parsing).
This commit is contained in:
1 parent
269a648d24
commit
4a26774818
2 files changed
+7
-8
No files matched your search
+6
-8
@@ -35,25 +35,23 @@
|
||||
- (void)feedDidFinishLoading:(RSS *)feed
|
||||
{
|
||||
// Set up all the appcast items:
|
||||
items = [NSMutableArray array];
|
||||
NSArray *tempItems = [NSMutableArray array];
|
||||
id enumerator = [[feed newsItems] objectEnumerator], current;
|
||||
@try
|
||||
{
|
||||
while ((current = [enumerator nextObject]))
|
||||
{
|
||||
[(NSMutableArray *)items addObject:[[[SUAppcastItem alloc] initWithDictionary:current] autorelease]];
|
||||
[(NSMutableArray *)tempItems addObject:[[[SUAppcastItem alloc] initWithDictionary:current] autorelease]];
|
||||
}
|
||||
items = [[NSArray arrayWithArray:tempItems] retain]; // Make the items list immutable.
|
||||
|
||||
if ([delegate respondsToSelector:@selector(appcastDidFinishLoading:)])
|
||||
[delegate performSelectorOnMainThread:@selector(appcastDidFinishLoading:) withObject:self waitUntilDone:NO];
|
||||
}
|
||||
@catch (NSException *parseException)
|
||||
{
|
||||
[self reportError:[NSError errorWithDomain:SUSparkleErrorDomain code:SUAppcastParseError userInfo:[NSDictionary dictionaryWithObjectsAndKeys:SULocalizedString(@"An error occurred while parsing the update feed.", nil), NSLocalizedDescriptionKey, [parseException reason], SUTechnicalErrorInformationKey, nil]]];
|
||||
return;
|
||||
}
|
||||
items = [[NSArray arrayWithArray:items] retain]; // Make the items list immutable.
|
||||
|
||||
if ([delegate respondsToSelector:@selector(appcastDidFinishLoading:)])
|
||||
[delegate performSelectorOnMainThread:@selector(appcastDidFinishLoading:) withObject:self waitUntilDone:NO];
|
||||
|
||||
CFRelease(feed);
|
||||
}
|
||||
|
||||
|
||||
@@ -1001,6 +1001,7 @@
|
||||
61072EAD0DF263BD008FE88B /* Release (GC dual-mode; 10.5-only) */ = {
|
||||
isa = XCBuildConfiguration;
|
||||
buildSettings = {
|
||||
GCC_VERSION = "";
|
||||
};
|
||||
name = "Release (GC dual-mode; 10.5-only)";
|
||||
};
|
||||
|
||||
Reference in new issue
Block a user