2009-05-05 Peter Kasting <pkasting@google.com>
Reviewed by Brady Eidson.
Safety-check m_documentLoader before dereferencing. While it seems
unlikely this could fail (as Safari 3 shipped without this),
technically almost any call can change or reset m_documentLoader.
* loader/FrameLoader.cpp:
(WebCore::FrameLoader::receivedFirstData):
git-svn-id: http://svn.webkit.org/repository/webkit/trunk@43248 268f45cc-cd09-0410-ab3c-d52691b4dbfc
diff --git a/WebCore/loader/FrameLoader.cpp b/WebCore/loader/FrameLoader.cpp
index ca541d2..0bbad2b 100644
--- a/WebCore/loader/FrameLoader.cpp
+++ b/WebCore/loader/FrameLoader.cpp
@@ -878,10 +878,12 @@
dispatchDidCommitLoad();
dispatchWindowObjectAvailable();
- String ptitle = m_documentLoader->title();
- // If we have a title let the WebView know about it.
- if (!ptitle.isNull())
- m_client->dispatchDidReceiveTitle(ptitle);
+ if (m_documentLoader) {
+ String ptitle = m_documentLoader->title();
+ // If we have a title let the WebView know about it.
+ if (!ptitle.isNull())
+ m_client->dispatchDidReceiveTitle(ptitle);
+ }
m_workingURL = KURL();