在if条件[environMent objectForKey:key]
中执行时,应用程序启动崩溃。如何修复此崩溃?
崩溃日志:
0x2e2cdfe3 CFDictionaryGetValue + 99
0x00505d87 -[Environments getValueforKey:] (Environments.m:62)
代码:
@try {
if (environMent != nil)
{
if ((key != nil) && ![key isEqual:[NSNull null]] && [key length] > 0 && [environMent objectForKey:key])
{
// Build the array from the plist
value = [environMent objectForKey:key];
}
}
}
@catch (NSException *exception) {
NSLog(@"Failed to get the object from plist: %@", [exception reason]);
}
完整崩溃日志:http://pastebin.com/LUjPJeAy