From 0b7e343a565e4bddd354ca2d6993d1f4a487742f Mon Sep 17 00:00:00 2001 From: Zorg Date: Wed, 1 Jul 2015 00:35:27 -0400 Subject: [PATCH 1/2] Don't use main bundle if passed in bundle is nil --- Sparkle/SUHost.m | 1 - 1 file changed, 1 deletion(-) diff --git a/Sparkle/SUHost.m b/Sparkle/SUHost.m index 8f559a87..ec074deb 100644 --- a/Sparkle/SUHost.m +++ b/Sparkle/SUHost.m @@ -41,7 +41,6 @@ typedef struct { { if ((self = [super init])) { - if (aBundle == nil) aBundle = [NSBundle mainBundle]; self.bundle = aBundle; if (![self.bundle bundleIdentifier]) { SULog(@"Error: the bundle being updated at %@ has no %@! This will cause preference read/write to not work properly.", self.bundle, kCFBundleIdentifierKey); From ddb67d1c84fdd607cfed98ba48f0a79ad5d86ac4 Mon Sep 17 00:00:00 2001 From: Zorg Date: Wed, 1 Jul 2015 22:00:29 -0400 Subject: [PATCH 2/2] Added assert to make sure bundle isn't nil --- Sparkle/SUHost.m | 1 + 1 file changed, 1 insertion(+) diff --git a/Sparkle/SUHost.m b/Sparkle/SUHost.m index ec074deb..3031e99d 100644 --- a/Sparkle/SUHost.m +++ b/Sparkle/SUHost.m @@ -41,6 +41,7 @@ typedef struct { { if ((self = [super init])) { + NSParameterAssert(aBundle); self.bundle = aBundle; if (![self.bundle bundleIdentifier]) { SULog(@"Error: the bundle being updated at %@ has no %@! This will cause preference read/write to not work properly.", self.bundle, kCFBundleIdentifierKey);