| Index: chrome/browser/ui/omnibox/chrome_omnibox_client.cc
|
| diff --git a/chrome/browser/ui/omnibox/chrome_omnibox_client.cc b/chrome/browser/ui/omnibox/chrome_omnibox_client.cc
|
| index 0089256506337c24efc58b65dc839028a8342a46..faa180d86be6d066dbe5521146b5348ac27c12cb 100644
|
| --- a/chrome/browser/ui/omnibox/chrome_omnibox_client.cc
|
| +++ b/chrome/browser/ui/omnibox/chrome_omnibox_client.cc
|
| @@ -140,11 +140,12 @@ ChromeOmniboxClient::CreateOmniboxNavigationObserver(
|
| }
|
|
|
| bool ChromeOmniboxClient::CurrentPageExists() const {
|
| - return (controller_->GetWebContents() != NULL);
|
| + return (controller_->GetWebContents() != nullptr);
|
| }
|
|
|
| const GURL& ChromeOmniboxClient::GetURL() const {
|
| - return controller_->GetWebContents()->GetVisibleURL();
|
| + return CurrentPageExists() ? controller_->GetWebContents()->GetVisibleURL()
|
| + : GURL::EmptyGURL();
|
| }
|
|
|
| const base::string16& ChromeOmniboxClient::GetTitle() const {
|
|
|