diff options
author | finnur@chromium.org <finnur@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-06-26 18:21:18 +0000 |
---|---|---|
committer | finnur@chromium.org <finnur@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-06-26 18:21:18 +0000 |
commit | 487c2873c78595f5ec78629a5ca92304b34ce317 (patch) | |
tree | 9613f3bb3780c45ecaa101c1a56471444051948e /chrome/browser/extensions/extension_page_actions_module.cc | |
parent | c3ef3de808a780aecedcd636739070875a61f79e (diff) | |
download | chromium_src-487c2873c78595f5ec78629a5ca92304b34ce317.zip chromium_src-487c2873c78595f5ec78629a5ca92304b34ce317.tar.gz chromium_src-487c2873c78595f5ec78629a5ca92304b34ce317.tar.bz2 |
Fix crash 15371
We need to null check the return from GetActiveEntry.
BUG=15371
TEST=Watch the crash data from the field and make sure the crash is gone.
Review URL: http://codereview.chromium.org/147214
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@19386 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser/extensions/extension_page_actions_module.cc')
-rw-r--r-- | chrome/browser/extensions/extension_page_actions_module.cc | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/chrome/browser/extensions/extension_page_actions_module.cc b/chrome/browser/extensions/extension_page_actions_module.cc index 09d2c47..66bd9e3 100644 --- a/chrome/browser/extensions/extension_page_actions_module.cc +++ b/chrome/browser/extensions/extension_page_actions_module.cc @@ -41,7 +41,8 @@ bool PageActionFunction::SetPageActionEnabled(bool enable) { } // Make sure the URL hasn't changed. - if (url != contents->controller().GetActiveEntry()->url().spec()) { + NavigationEntry* entry = contents->controller().GetActiveEntry(); + if (!entry || url != entry->url().spec()) { error_ = ExtensionErrorUtils::FormatErrorMessage(keys::kUrlNotActiveError, url); return false; |