diff --git a/ObjC/PonyDebugger/PDNetworkDomainController.m b/ObjC/PonyDebugger/PDNetworkDomainController.m index 932a880..80cd295 100644 --- a/ObjC/PonyDebugger/PDNetworkDomainController.m +++ b/ObjC/PonyDebugger/PDNetworkDomainController.m @@ -609,7 +609,7 @@ - (id)initWithURLRequest:(NSURLRequest *)request NSString *contentType = [request valueForHTTPHeaderField:@"Content-Type"]; // Do some trivial redacting here. In particular, redact password - if (contentType && [contentType rangeOfString:@"json"].location != NSNotFound) { + if (body && contentType && [contentType rangeOfString:@"json"].location != NSNotFound) { NSMutableDictionary *obj = [NSJSONSerialization JSONObjectWithData:body options:0 error:NULL]; if ([obj isKindOfClass:[NSDictionary class]] && [obj objectForKey:@"password"]) { obj = [obj mutableCopy];