Add check to prevent CFRelease(NULL) crash for mimeType

This commit is contained in:
Abdullah M 2019-04-18 10:19:31 +08:00 committed by GitHub
parent 45b89479cf
commit 4d879e4cb1
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 1 additions and 1 deletions

View File

@ -101,7 +101,7 @@ RCT_EXPORT_MODULE()
MIMEType:(__bridge NSString *)(mimeType)
expectedContentLength:length
textEncodingName:nil];
CFRelease(mimeType);
if(mimeType) CFRelease(mimeType);
[delegate URLRequest:cancellationBlock didReceiveResponse:response];