mirror of
https://github.com/sparkle-project/Sparkle
synced 2026-11-26 04:57:54 +00:00
Fix to reachability patch in 9cc1905f87 for file:// URLs, which were crashing
This commit is contained in:
1 parent
f04a460d63
commit
06642bba20
1 file changed
+6
-2
+6
-2
@@ -235,8 +235,12 @@ static NSString * const SUUpdaterDefaultsObservationContext = @"SUUpdaterDefault
|
||||
|
||||
const char *hostname = [[[theDict objectForKey: @"feedURL"] host] cStringUsingEncoding: NSUTF8StringEncoding];
|
||||
SCNetworkReachabilityRef reachability = SCNetworkReachabilityCreateWithName(NULL, hostname);
|
||||
Boolean reachabilityResult = SCNetworkReachabilityGetFlags(reachability, &flags);
|
||||
CFRelease(reachability);
|
||||
Boolean reachabilityResult = NO;
|
||||
// If the feed's using a file:// URL, we won't be able to use reachability.
|
||||
if (reachability != NULL) {
|
||||
SCNetworkReachabilityGetFlags(reachability, &flags);
|
||||
CFRelease(reachability);
|
||||
}
|
||||
|
||||
if( reachabilityResult )
|
||||
{
|
||||
|
||||
Reference in new issue
Block a user