From f8f4525c1f08c417a46dc12ad53780b49660919d Mon Sep 17 00:00:00 2001 From: "philipj@opera.com" Date: Thu, 3 Oct 2013 08:40:33 +0000 Subject: [PATCH] Don't crash on invalid URL in GTK ContentShell Entering an invalid URL crashed on the failing DCHECK in GURL::spec(). BUG= Review URL: https://codereview.chromium.org/25841002 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@226715 0039d316-1c4b-4281-b951-d872f2087c98 --- content/shell/browser/shell_gtk.cc | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/content/shell/browser/shell_gtk.cc b/content/shell/browser/shell_gtk.cc index a06a6a036f80..3cc71f716683 100644 --- a/content/shell/browser/shell_gtk.cc +++ b/content/shell/browser/shell_gtk.cc @@ -281,7 +281,8 @@ void Shell::OnURLEntryActivate(GtkWidget* entry) { GURL url(str); if (!url.has_scheme()) url = GURL(std::string("http://") + std::string(str)); - LoadURL(GURL(url)); + if (url.is_valid()) + LoadURL(url); } // Callback for when the main window is destroyed. -- 2.11.4.GIT