Browse Source

Ignore already closed windows

Kevin Sawicki 8 years ago
parent
commit
140651c258
1 changed files with 2 additions and 1 deletions
  1. 2 1
      atom/browser/window_list.cc

+ 2 - 1
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() {