Fix iOS Simulator Release test crashes.
[WebKit-https.git] / Source / WebCore / platform / network / ios / WebCoreURLResponseIOS.mm
index 0509ed6..00b5ab2 100644 (file)
@@ -71,7 +71,8 @@ void adjustMIMETypeIfNecessary(CFURLResponseRef cfResponse, bool isMainResourceL
                 CFMutableStringRef mutableExtension = CFStringCreateMutableCopy(kCFAllocatorDefault, 0, extension.get());
                 CFStringLowercase(mutableExtension, NULL);
                 extension = adoptCF(mutableExtension);
-                updatedMIMEType = (CFStringRef)CFDictionaryGetValue(extensionMap, extension.get());
+                if (auto newMIMEType = (CFStringRef)CFDictionaryGetValue(extensionMap, extension.get()))
+                    updatedMIMEType = newMIMEType;
             }
         }
     }