Browse Source

make copy of list before enumerating.

pull/3943/head
Dan Walmsley 6 years ago
parent
commit
c928700feb
  1. 2
      src/Avalonia.Controls/Window.cs

2
src/Avalonia.Controls/Window.cs

@ -376,7 +376,7 @@ namespace Avalonia.Controls
private void CloseInternal ()
{
foreach(var child in _children)
foreach(var child in _children.ToList())
{
// if we HandleClosing() before then there will be no children.
child.CloseInternal();

Loading…
Cancel
Save