diff --git a/atom/browser/native_window.cc b/atom/browser/native_window.cc index 2077806c5b52..464bdae7fa31 100644 --- a/atom/browser/native_window.cc +++ b/atom/browser/native_window.cc @@ -60,7 +60,10 @@ NativeWindow::NativeWindow(const mate::Dictionary& options, NativeWindow::~NativeWindow() { // It's possible that the windows gets destroyed before it's closed, in that - // case we need to ensure the OnWindowClosed message is still notified. + // case we need to ensure the Widget delegate gets destroyed and + // OnWindowClosed message is still notified. + if (widget_->widget_delegate()) + widget_->OnNativeWidgetDestroyed(); NotifyWindowClosed(); }