summaryrefslogtreecommitdiffstats
path: root/webkit/glue
diff options
context:
space:
mode:
authorcmp@google.com <cmp@google.com@0039d316-1c4b-4281-b951-d872f2087c98>2009-07-23 00:06:38 +0000
committercmp@google.com <cmp@google.com@0039d316-1c4b-4281-b951-d872f2087c98>2009-07-23 00:06:38 +0000
commit6593987ee729cefeaad73dddca26dd0294c42881 (patch)
treefed656502a8a809a1bf89cc2804c5e97190a25ff /webkit/glue
parent946d1b2c806795351598aeb9faaed797284a8ee3 (diff)
downloadchromium_src-6593987ee729cefeaad73dddca26dd0294c42881.zip
chromium_src-6593987ee729cefeaad73dddca26dd0294c42881.tar.gz
chromium_src-6593987ee729cefeaad73dddca26dd0294c42881.tar.bz2
Fix NULL_RETURN defect found by Coverity.
CID=4773 BUG=17081 TEST=Compile, run, and browse google.com with Chromium. Review URL: http://codereview.chromium.org/159227 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@21343 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'webkit/glue')
-rw-r--r--webkit/glue/chrome_client_impl.cc6
1 files changed, 5 insertions, 1 deletions
diff --git a/webkit/glue/chrome_client_impl.cc b/webkit/glue/chrome_client_impl.cc
index 18b0544..ac1866f 100644
--- a/webkit/glue/chrome_client_impl.cc
+++ b/webkit/glue/chrome_client_impl.cc
@@ -157,7 +157,11 @@ void ChromeClientImpl::focus() {
// If accessibility is enabled, we should notify assistive technology that
// the active AccessibilityObject changed.
- WebCore::Document* doc = webview_->GetFocusedWebCoreFrame()->document();
+ const WebCore::Frame* frame = webview_->GetFocusedWebCoreFrame();
+ if (!frame)
+ return;
+
+ WebCore::Document* doc = frame->document();
if (doc && doc->axObjectCache()->accessibilityEnabled()) {
WebCore::Node* focused_node = webview_->GetFocusedNode();