Fixes a crash when opening a guest profile with the Brave News button enabled. (#15138)

This commit is contained in:
Jay Harris
2022-09-20 14:30:56 +12:00
committed by GitHub
parent 0bb177826e
commit cc3e2a7c6f
+2 -1
View File
@@ -119,7 +119,8 @@ void AttachTabHelpers(content::WebContents* web_contents) {
#endif
if (base::FeatureList::IsEnabled(
brave_today::features::kBraveNewsSubscribeButtonFeature)) {
brave_today::features::kBraveNewsSubscribeButtonFeature) &&
!web_contents->GetBrowserContext()->IsOffTheRecord()) {
BraveNewsTabHelper::CreateForWebContents(web_contents);
}