(fix) sanity check when no defaults are found (fixes #4179)

This commit is contained in:
Ludovic Marcotte
2017-05-30 14:45:21 -04:00
parent d7eb751951
commit bbac466276
+4 -1
View File
@@ -67,8 +67,8 @@
- (NSString *) processDefaults: (BOOL)allDefaults
{
NSUserDefaults *ud;
NSDictionary *defaultsDict;
NSUserDefaults *ud;
NSData *plistData;
ud = [NSUserDefaults standardUserDefaults];
@@ -83,6 +83,9 @@
defaultsDict = [ud persistentDomainForName: @"sogod"];
}
if (!defaultsDict)
return @"No defaults found. Try to use -f.";
plistData = [NSPropertyListSerialization dataFromPropertyList: (id) defaultsDict
format: NSPropertyListOpenStepFormat
errorDescription: 0 ];