From 7ff26c2b9f08f9fd2b79c882c13eabe3c93c6a69 Mon Sep 17 00:00:00 2001 From: Ivan Efremov Date: Wed, 9 Jan 2019 16:36:59 +0700 Subject: [PATCH] Issue 2799: Fix tab crash while resizing the devtools window. FrameContentClient of a given frame can obviously be null, lets check it. Fix https://github.com/brave/brave-browser/issues/2799 --- renderer/brave_content_settings_observer_helper.h | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/renderer/brave_content_settings_observer_helper.h b/renderer/brave_content_settings_observer_helper.h index 7abbcc23184d..a471eb0de8fd 100644 --- a/renderer/brave_content_settings_observer_helper.h +++ b/renderer/brave_content_settings_observer_helper.h @@ -12,7 +12,9 @@ #include "third_party/blink/renderer/platform/bindings/script_state.h" static bool AllowFingerprinting(blink::LocalFrame* frame) { - if (!frame) return true; + if (!frame || !frame->GetContentSettingsClient()) { + return true; + } return frame->GetContentSettingsClient()->AllowFingerprinting(true); }