diff options
author | mpcomplete@chromium.org <mpcomplete@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2010-02-19 00:57:35 +0000 |
---|---|---|
committer | mpcomplete@chromium.org <mpcomplete@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2010-02-19 00:57:35 +0000 |
commit | 61a2f212908058f456c931c7e7e261fd6cd185bb (patch) | |
tree | f7e379e850184f4e39f5c3058c4cc44fcb057bb3 | |
parent | d997862f6c876e5fe85304a6f0ab82dbd1acf576 (diff) | |
download | chromium_src-61a2f212908058f456c931c7e7e261fd6cd185bb.zip chromium_src-61a2f212908058f456c931c7e7e261fd6cd185bb.tar.gz chromium_src-61a2f212908058f456c931c7e7e261fd6cd185bb.tar.bz2 |
Fix a crash when installing an extension from incognito mode.
BUG=36077
Review URL: http://codereview.chromium.org/646072
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@39408 0039d316-1c4b-4281-b951-d872f2087c98
-rw-r--r-- | chrome/browser/views/extensions/extension_installed_bubble.cc | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/chrome/browser/views/extensions/extension_installed_bubble.cc b/chrome/browser/views/extensions/extension_installed_bubble.cc index 7f92bbc..593165e 100644 --- a/chrome/browser/views/extensions/extension_installed_bubble.cc +++ b/chrome/browser/views/extensions/extension_installed_bubble.cc @@ -251,10 +251,13 @@ void ExtensionInstalledBubble::ShowInternal() { } reference_view = container->GetBrowserActionView(extension_); // If the view is not visible then it is in the chevron, so point the - // install bubble to the chevron instead. - if (!reference_view->IsVisible()) + // install bubble to the chevron instead. If this is an incognito window, + // both could be invisible. + if (!reference_view || !reference_view->IsVisible()) { reference_view = container->chevron(); - DCHECK(reference_view); + if (!reference_view || !reference_view->IsVisible()) + reference_view = NULL; // fall back to app menu below. + } } else if (type_ == PAGE_ACTION) { LocationBarView* location_bar_view = browser_view->GetLocationBarView(); location_bar_view->SetPreviewEnabledPageAction(extension_->page_action(), |