summaryrefslogtreecommitdiffstats
path: root/chrome
diff options
context:
space:
mode:
Diffstat (limited to 'chrome')
-rw-r--r--chrome/browser/browser_init.cc4
1 files changed, 3 insertions, 1 deletions
diff --git a/chrome/browser/browser_init.cc b/chrome/browser/browser_init.cc
index 3ca6020..d0a8d14 100644
--- a/chrome/browser/browser_init.cc
+++ b/chrome/browser/browser_init.cc
@@ -140,7 +140,9 @@ class NotifyNotDefaultBrowserTask : public Task {
}
TabContents* tab = browser->GetSelectedTabContents();
// Don't show the info-bar if there are already info-bars showing.
- if (tab->infobar_delegate_count() > 0)
+ // In ChromeBot tests, there might be a race. This line appears to get
+ // called during shutdown and |tab| can be NULL.
+ if (!tab || tab->infobar_delegate_count() > 0)
return;
tab->AddInfoBar(new DefaultBrowserInfoBarDelegate(tab));
}