Merge pull request #7432 from electron/check-if-window-closed
Ignore already closed windows
This commit is contained in:
commit
ec34bfde26
1 changed files with 2 additions and 1 deletions
|
@ -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() {
|
||||
|
|
Loading…
Reference in a new issue