summaryrefslogtreecommitdiffstats
path: root/chrome
diff options
context:
space:
mode:
authorsky@chromium.org <sky@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2009-12-18 00:27:37 +0000
committersky@chromium.org <sky@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2009-12-18 00:27:37 +0000
commit0808130f33f7e949b29387298006afee154ff371 (patch)
treeb3643bb69c841c53bc56f0633779f60f705a4f74 /chrome
parentd03f5c49bbcbf899273a1d6795dd63da57cd38c3 (diff)
downloadchromium_src-0808130f33f7e949b29387298006afee154ff371.zip
chromium_src-0808130f33f7e949b29387298006afee154ff371.tar.gz
chromium_src-0808130f33f7e949b29387298006afee154ff371.tar.bz2
Fixes bug in MainMenu that if there are no browsers around when timer
fires we get a crash. BUG=none TEST=none TBR=oshima Review URL: http://codereview.chromium.org/502065 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@34905 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome')
-rw-r--r--chrome/browser/chromeos/main_menu.cc3
1 files changed, 3 insertions, 0 deletions
diff --git a/chrome/browser/chromeos/main_menu.cc b/chrome/browser/chromeos/main_menu.cc
index 0930bcbd..f4bdcaf 100644
--- a/chrome/browser/chromeos/main_menu.cc
+++ b/chrome/browser/chromeos/main_menu.cc
@@ -289,6 +289,9 @@ void MainMenu::TabContentsDelegateImpl::OpenURLFromTab(
// LoadTask -------------------------------------------------------------------
void MainMenu::LoadTask::Run() {
+ if (BrowserList::begin() == BrowserList::end())
+ return; // No browser are around. Generally only happens during testing.
+
MainMenu::Get();
}