diff --git a/atom/browser/common_web_contents_delegate.cc b/atom/browser/common_web_contents_delegate.cc index 01f8c8b735f0..02c3ebee3a68 100644 --- a/atom/browser/common_web_contents_delegate.cc +++ b/atom/browser/common_web_contents_delegate.cc @@ -187,7 +187,7 @@ void CommonWebContentsDelegate::InitWithWebContents( // Determien whether the WebContents is offscreen. auto* web_preferences = WebContentsPreferences::From(web_contents); offscreen_ = - !web_preferences || web_preferences->IsEnabled(options::kOffscreen); + web_preferences && web_preferences->IsEnabled(options::kOffscreen); // Create InspectableWebContents. web_contents_.reset(InspectableWebContents::Create(