summaryrefslogtreecommitdiffstats
path: root/chrome/browser/tab_contents
diff options
context:
space:
mode:
authorfinnur@chromium.org <finnur@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2011-11-11 10:05:07 +0000
committerfinnur@chromium.org <finnur@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2011-11-11 10:05:07 +0000
commitfa87b080bd7f164a4e082f9a332e327c6e20d76b (patch)
tree397b4a1af177ef6e261754ed1559830b28e03938 /chrome/browser/tab_contents
parent84a7d8a05f82210630e7bc19f79c038060539523 (diff)
downloadchromium_src-fa87b080bd7f164a4e082f9a332e327c6e20d76b.zip
chromium_src-fa87b080bd7f164a4e082f9a332e327c6e20d76b.tar.gz
chromium_src-fa87b080bd7f164a4e082f9a332e327c6e20d76b.tar.bz2
Fix browser crash when viewing page info on certain popups.
A check for NULL NavigationEntry was removed when issue 91325 was fixed. This readds it. BUG=103453 TEST=Repro steps are in the bug, work reliably for me on W7. Review URL: http://codereview.chromium.org/8462018 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@109606 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser/tab_contents')
-rw-r--r--chrome/browser/tab_contents/render_view_context_menu.cc6
1 files changed, 3 insertions, 3 deletions
diff --git a/chrome/browser/tab_contents/render_view_context_menu.cc b/chrome/browser/tab_contents/render_view_context_menu.cc
index 180fece..ae12b23 100644
--- a/chrome/browser/tab_contents/render_view_context_menu.cc
+++ b/chrome/browser/tab_contents/render_view_context_menu.cc
@@ -1048,11 +1048,11 @@ bool RenderViewContextMenu::IsCommandIdEnabled(int id) const {
return source_tab_contents_->controller().CanViewSource();
case IDC_CONTENT_CONTEXT_INSPECTELEMENT:
- // Viewing page info is not a developer command but is meaningful for the
- // same set of pages which developer commands are meaningful for.
- case IDC_CONTENT_CONTEXT_VIEWPAGEINFO:
return IsDevCommandEnabled(id);
+ case IDC_CONTENT_CONTEXT_VIEWPAGEINFO:
+ return source_tab_contents_->controller().GetActiveEntry() != NULL;
+
case IDC_CONTENT_CONTEXT_TRANSLATE: {
TabContentsWrapper* tab_contents_wrapper =
TabContentsWrapper::GetCurrentWrapperForContents(