diff options
-rw-r--r-- | chrome/browser/browser_init.cc | 22 |
1 files changed, 12 insertions, 10 deletions
diff --git a/chrome/browser/browser_init.cc b/chrome/browser/browser_init.cc index 00db034..f7595a1 100644 --- a/chrome/browser/browser_init.cc +++ b/chrome/browser/browser_init.cc @@ -444,18 +444,20 @@ bool BrowserInit::LaunchWithProfile::Launch(Profile* profile, if (!parsed_command_line.HasSwitch(switches::kHomePage) && GetURLsFromCommandLine(profile_).empty()) { Browser* browser = BrowserList::GetLastActive(); - // Only show the splash page if it isn't already showing. - bool open_splash = true; - for (int i = 0; i < browser->tab_count(); ++i) { - if (browser->GetTabContentsAt(i)->GetURL().spec() == - "about:linux-splash") { - open_splash = false; + if (browser) { + // Only show the splash page if it isn't already showing. + bool open_splash = true; + for (int i = 0; i < browser->tab_count(); ++i) { + if (browser->GetTabContentsAt(i)->GetURL().spec() == + "about:linux-splash") { + open_splash = false; + } } - } - if (open_splash) { - browser->OpenURL(GURL("about:linux-splash"), GURL(), - NEW_FOREGROUND_TAB, PageTransition::START_PAGE); + if (open_splash) { + browser->OpenURL(GURL("about:linux-splash"), GURL(), + NEW_FOREGROUND_TAB, PageTransition::START_PAGE); + } } } #endif |