From 140651c258ddf738a96268be99b82a9cc8ca54c8 Mon Sep 17 00:00:00 2001 From: Kevin Sawicki Date: Fri, 30 Sep 2016 15:04:13 -0700 Subject: [PATCH] Ignore already closed windows --- atom/browser/window_list.cc | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/atom/browser/window_list.cc b/atom/browser/window_list.cc index 83bf615aad25..b8e5a8256530 100644 --- a/atom/browser/window_list.cc +++ b/atom/browser/window_list.cc @@ -71,7 +71,8 @@ void WindowList::RemoveObserver(WindowListObserver* observer) { void WindowList::CloseAllWindows() { WindowVector windows = GetInstance()->windows_; for (const auto& window : windows) - window->Close(); + if (!window->IsClosed()) + window->Close(); } WindowList::WindowList() {