Reviewed by Dave Harrison
authorbeidson <beidson@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Mon, 6 Nov 2006 19:05:10 +0000 (19:05 +0000)
committerbeidson <beidson@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Mon, 6 Nov 2006 19:05:10 +0000 (19:05 +0000)
        <rdar://problem/4801066>
        Added a critical null frameLoader() check

        * loader/mac/MainResourceLoaderMac.mm:
        (WebCore::MainResourceLoader::loadNow):

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@17622 268f45cc-cd09-0410-ab3c-d52691b4dbfc

WebCore/ChangeLog
WebCore/loader/mac/MainResourceLoaderMac.mm

index 125560d0f8e63fef31864361f08837f5e3153564..7d3679bd63f0af2241db1b16d44c5568b29c8ec4 100644 (file)
@@ -1,3 +1,13 @@
+2006-11-06  Brady Eidson  <beidson@apple.com>
+
+        Reviewed by Dave Harrison
+
+        <rdar://problem/4801066>
+        Added a critical null frameLoader() check
+
+        * loader/mac/MainResourceLoaderMac.mm:
+        (WebCore::MainResourceLoader::loadNow):
+
 2006-11-06  David Harrison  <harrison@apple.com>
 
         Reviewed by Darin.
index bd8742858de8282671f8e0374e3f401b172850cb..4c79d78969fe840d6c9b926d600cb146552c30fe 100644 (file)
@@ -349,6 +349,12 @@ NSURLRequest *MainResourceLoader::loadNow(NSURLRequest *r)
     // we no longer send the callback from within NSURLConnection for
     // initial requests.
     r = willSendRequest(r, nil);
+    
+    // <rdar://problem/4801066>
+    // willSendRequest() is liable to make the call to frameLoader() return NULL, so we need to check that here
+    if (!frameLoader())
+        return nil;
+    
     NSURL *URL = [r URL];
     bool shouldLoadEmpty = shouldLoadAsEmptyDocument(URL);