Potential Fix for Crash
This commit is contained in:
parent
a570f3c0e6
commit
2b36711bca
@ -686,6 +686,9 @@
|
||||
|
||||
if (obj && [obj isKindOfClass:[NSDictionary class]]) {
|
||||
NSDictionary *responseInfo = [obj dict:KeyResponseInfo];
|
||||
if (responseInfo == nil) {
|
||||
errorObject = [[MVMCoreLoadHandler sharedGlobal] errorForLoadObject:loadObject withTitle:nil message:[MVMCoreGetterUtility hardcodedStringWithKey:HardcodedErrorCritical] code:ErrorCodeJSONNotDictionary domain:ErrorDomainSystem];
|
||||
}else {
|
||||
if (![ValueTypeSuccess isEqualToString:[responseInfo string:KeyType]]) {
|
||||
errorObject = [[MVMCoreLoadHandler sharedGlobal] attachLoadInformation:loadObject toError:
|
||||
[[MVMCoreErrorObject alloc]
|
||||
@ -696,7 +699,7 @@
|
||||
domain:ErrorDomainServer
|
||||
location:[[MVMCoreLoadHandler sharedGlobal] errorLocationForRequest:loadObject]]];
|
||||
}
|
||||
|
||||
}
|
||||
// Caches each dictionary from the array.
|
||||
[[MVMCoreCache sharedCache] addModuleToCache:obj module:key queue:nil waitUntilFinished:YES completionBlock:NULL];
|
||||
} else {
|
||||
|
||||
@ -23,8 +23,10 @@
|
||||
// Initialization code
|
||||
self.title = title;
|
||||
self.messageToDisplay = message;
|
||||
self.messageToLog = message;
|
||||
self.code = code;
|
||||
self.domain = domain;
|
||||
self.systemDomain = nil;
|
||||
self.location = location;
|
||||
self.date = [NSDate date];
|
||||
self.silentError = YES;
|
||||
@ -32,6 +34,11 @@
|
||||
[MVMCoreDispatchUtility performSyncBlockOnMainThread:^{
|
||||
self.applicationState = [UIApplication sharedApplication].applicationState;
|
||||
}];
|
||||
self.sessionId = nil;
|
||||
self.requestId = nil;
|
||||
self.requestUrl = nil;
|
||||
self.serverResponseInfo = nil;
|
||||
self.crashLog = nil;
|
||||
}
|
||||
return self;
|
||||
}
|
||||
@ -41,9 +48,11 @@
|
||||
if (self = [super init]) {
|
||||
// Initialization code
|
||||
self.title = title;
|
||||
self.messageToDisplay = nil;
|
||||
self.messageToLog = messageToLog;
|
||||
self.code = code;
|
||||
self.domain = domain;
|
||||
self.systemDomain = nil;
|
||||
self.location = location;
|
||||
self.date = [NSDate date];
|
||||
self.silentError = YES;
|
||||
@ -51,6 +60,11 @@
|
||||
[MVMCoreDispatchUtility performSyncBlockOnMainThread:^{
|
||||
self.applicationState = [UIApplication sharedApplication].applicationState;
|
||||
}];
|
||||
self.sessionId = nil;
|
||||
self.requestId = nil;
|
||||
self.requestUrl = nil;
|
||||
self.serverResponseInfo = nil;
|
||||
self.crashLog = nil;
|
||||
}
|
||||
return self;
|
||||
}
|
||||
|
||||
Loading…
Reference in New Issue
Block a user