Don't crash using CFPreferences when defaultsDomain is unknown

This commit is contained in:
Kornel Lesiński committed 2014-07-25 01:30:00 +01:00
1 parent 3f37fe7674
commit d3198961d7
1 file changed
+1 -1
+1 -1
View File
@@ -53,7 +53,7 @@ typedef struct {
}
// If we're using the main bundle's defaults we'll use the standard user defaults mechanism, otherwise we have to get CF-y.
usesStandardUserDefaults = [self.defaultsDomain isEqualToString:[[NSBundle mainBundle] bundleIdentifier]];
usesStandardUserDefaults = !self.defaultsDomain || [self.defaultsDomain isEqualToString:[[NSBundle mainBundle] bundleIdentifier]];
}
return self;
}