Merge pull request #566 from zorgiepoo/bundle-nil-check

Don't use main bundle if passed in bundle is nil
This commit is contained in:
Kornel committed 2015-07-03 14:46:17 +01:00
commit e5e560e751
1 file changed
+1 -1
+1 -1
View File
@@ -41,7 +41,7 @@ typedef struct {
{
if ((self = [super init]))
{
if (aBundle == nil) aBundle = [NSBundle mainBundle];
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);