From aa96a6e52928fc94fec148a559cf2fbaac71b603 Mon Sep 17 00:00:00 2001 From: Pranjal Date: Mon, 5 Mar 2018 12:54:01 -0800 Subject: [PATCH] Revert "null check not needed" This reverts commit e3407222117affc19dd3878f811456ce1b8da1d4. --- brave/browser/brave_content_browser_client.cc | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/brave/browser/brave_content_browser_client.cc b/brave/browser/brave_content_browser_client.cc index 063fc0109b..73d4b35569 100644 --- a/brave/browser/brave_content_browser_client.cc +++ b/brave/browser/brave_content_browser_client.cc @@ -658,7 +658,9 @@ void BraveContentBrowserClient::OverrideWebkitPrefs( prefs->hyperlink_auditing_enabled = false; // Custom preferences of guest page. auto web_contents = content::WebContents::FromRenderViewHost(host); - atom::WebContentsPreferences::OverrideWebkitPrefs(web_contents, prefs); + if (web_contents) { + atom::WebContentsPreferences::OverrideWebkitPrefs(web_contents, prefs); + } #if BUILDFLAG(ENABLE_EXTENSIONS) extensions_part_->OverrideWebkitPrefs(host, prefs); #endif