Guard against delegate returning nil channels incorrectly

This commit is contained in:
Zorg committed 2021-06-27 00:47:54 -07:00
1 parent bc7e2d4845
commit 64484507b5
1 file changed
+4
+4
View File
@@ -169,6 +169,10 @@
NSSet<NSString *> *allowedChannels;
if ([self.updaterDelegate respondsToSelector:@selector(allowedChannelsForUpdater:)]) {
allowedChannels = [self.updaterDelegate allowedChannelsForUpdater:self.updater];
if (allowedChannels == nil) {
SULog(SULogLevelError, @"Error: -allowedChannelsForUpdater: cannot return nil. Treating this as an empty set.");
allowedChannels = [NSSet set];
}
} else {
allowedChannels = [NSSet set];
}