diff --git a/atom/browser/native_window.cc b/atom/browser/native_window.cc index 3e2bbd1cc2fe..01ed47464d17 100644 --- a/atom/browser/native_window.cc +++ b/atom/browser/native_window.cc @@ -498,6 +498,9 @@ void NativeWindow::RenderViewCreated( } void NativeWindow::CloseContents(content::WebContents* source) { + if (!inspectable_web_contents_) + return; + inspectable_web_contents_->GetView()->SetDelegate(nullptr); inspectable_web_contents_ = nullptr; diff --git a/atom/browser/native_window_views.cc b/atom/browser/native_window_views.cc index 4c7700d3f2be..e0e276fea640 100644 --- a/atom/browser/native_window_views.cc +++ b/atom/browser/native_window_views.cc @@ -16,7 +16,8 @@ #include "atom/common/draggable_region.h" #include "atom/common/options_switches.h" #include "base/strings/utf_string_conversions.h" -#include "browser/inspectable_web_contents_view.h" +#include "brightray/browser/inspectable_web_contents.h" +#include "brightray/browser/inspectable_web_contents_view.h" #include "content/public/browser/native_web_keyboard_event.h" #include "native_mate/dictionary.h" #include "ui/aura/window.h"