Fix crash when feedURL is nil for some reason.

This commit is contained in:
Sergey Tatarchuk authored and Dmytro Tretiakov committed 2014-07-30 15:38:12 +03:00
1 parent b6b704ea55
commit d81139830e
1 file changed
+9 -1
+9 -1
View File
@@ -225,7 +225,15 @@ static NSString * const SUUpdaterDefaultsObservationContext = @"SUUpdaterDefault
-(void) putFeedURLIntoDictionary: (NSMutableDictionary*)theDict // You release this.
{
[theDict setObject: [self feedURL] forKey: @"feedURL"];
NSURL *feedURL = [self feedURL];
if (feedURL != nil)
{
[theDict setObject:feedURL forKey: @"feedURL"];
}
else
{
NSLog(@"Cannot put feedURL into dictionary: feedURL is nil");
}
}
-(void) checkForUpdatesInBgReachabilityCheckWithDriver: (SUUpdateDriver*)inDriver /* RUNS ON ITS OWN THREAD */