Merge pull request #7432 from electron/check-if-window-closed

Ignore already closed windows
This commit is contained in:
Cheng Zhao 2016-10-03 21:21:35 +09:00 committed by GitHub
commit ec34bfde26

View file

@ -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() {