From 64484507b5fc5afabda5b5fa86558faac628f76b Mon Sep 17 00:00:00 2001 From: Zorg Date: Sun, 27 Jun 2021 00:47:54 -0700 Subject: [PATCH] Guard against delegate returning nil channels incorrectly --- Sparkle/SUAppcastDriver.m | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/Sparkle/SUAppcastDriver.m b/Sparkle/SUAppcastDriver.m index c848fa34..2622ece0 100644 --- a/Sparkle/SUAppcastDriver.m +++ b/Sparkle/SUAppcastDriver.m @@ -169,6 +169,10 @@ NSSet *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]; }