summaryrefslogtreecommitdiffstats
path: root/chrome/browser/browser_init.cc
diff options
context:
space:
mode:
authorestade@chromium.org <estade@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2009-10-20 17:39:44 +0000
committerestade@chromium.org <estade@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2009-10-20 17:39:44 +0000
commitb306dbb304f5aefba51bf9716bede129869974ea (patch)
tree41d5b102ff1b819bc85d8adcaea6f628d0e65f30 /chrome/browser/browser_init.cc
parent6b5b4e92a6527791677584ded24a63b89e135fbd (diff)
downloadchromium_src-b306dbb304f5aefba51bf9716bede129869974ea.zip
chromium_src-b306dbb304f5aefba51bf9716bede129869974ea.tar.gz
chromium_src-b306dbb304f5aefba51bf9716bede129869974ea.tar.bz2
Ignore invalid urls on command line.
BUG=none TEST=chrome doesn't dcheck if you launch with a command line such as "chrome %U" Review URL: http://codereview.chromium.org/293010 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@29529 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser/browser_init.cc')
-rw-r--r--chrome/browser/browser_init.cc6
1 files changed, 4 insertions, 2 deletions
diff --git a/chrome/browser/browser_init.cc b/chrome/browser/browser_init.cc
index eb7c8765..9d66324 100644
--- a/chrome/browser/browser_init.cc
+++ b/chrome/browser/browser_init.cc
@@ -634,8 +634,10 @@ std::vector<GURL> BrowserInit::LaunchWithProfile::GetURLsFromCommandLine(
TemplateURLRef::NO_SUGGESTIONS_AVAILABLE, std::wstring()))));
} else {
// This will create a file URL or a regular URL.
- urls.push_back(GURL(WideToUTF8(
- URLFixerUpper::FixupRelativeFile(cur_dir_, value))));
+ GURL url = GURL(WideToUTF8(
+ URLFixerUpper::FixupRelativeFile(cur_dir_, value)));
+ if (url.is_valid())
+ urls.push_back(url);
}
}
return urls;