summaryrefslogtreecommitdiffstats
path: root/chrome/browser
diff options
context:
space:
mode:
authorchocobo@chromium.org <chocobo@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2009-11-17 18:45:14 +0000
committerchocobo@chromium.org <chocobo@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2009-11-17 18:45:14 +0000
commit8e982d9975c5fc763ad90282d827549b989f862f (patch)
treea6ebbe0adcd3df6be58942ac89ff579440285976 /chrome/browser
parentc40cbc20c8a50d4e3a27d68aafa90188473a2f02 (diff)
downloadchromium_src-8e982d9975c5fc763ad90282d827549b989f862f.zip
chromium_src-8e982d9975c5fc763ad90282d827549b989f862f.tar.gz
chromium_src-8e982d9975c5fc763ad90282d827549b989f862f.tar.bz2
Fix crashing bug due to browser being NULL.
BUG=None TEST=None Review URL: http://codereview.chromium.org/400015 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@32187 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser')
-rw-r--r--chrome/browser/chromeos/main_menu.cc6
1 files changed, 3 insertions, 3 deletions
diff --git a/chrome/browser/chromeos/main_menu.cc b/chrome/browser/chromeos/main_menu.cc
index e5a2bae..63549a6 100644
--- a/chrome/browser/chromeos/main_menu.cc
+++ b/chrome/browser/chromeos/main_menu.cc
@@ -146,13 +146,13 @@ MainMenu::MainMenu()
GURL menu_url(GetMenuURL());
DCHECK(BrowserList::begin() != BrowserList::end());
// TODO(sky): this shouldn't pick a random profile to use.
- site_instance_ = SiteInstance::CreateSiteInstanceForURL(
- (*BrowserList::begin())->profile(), menu_url);
+ Profile* profile = (*BrowserList::begin())->profile();
+ site_instance_ = SiteInstance::CreateSiteInstanceForURL(profile, menu_url);
menu_rvh_ = new RenderViewHost(site_instance_, this, MSG_ROUTING_NONE);
rwhv_ = new RenderWidgetHostViewGtk(menu_rvh_);
rwhv_->InitAsChild();
- menu_rvh_->CreateRenderView(browser_->profile()->GetRequestContext());
+ menu_rvh_->CreateRenderView(profile->GetRequestContext());
menu_popup->AddChild(rwhv_->GetNativeView());
gfx::Size rwhv_size = CalculateRWHVSize(popup_size);
menu_popup->PositionChild(rwhv_->GetNativeView(), kRendererX, kRendererY,