diff --git a/trunk/CHANGELOG.txt b/trunk/CHANGELOG.txt index 63ea27355..00a3993cb 100644 --- a/trunk/CHANGELOG.txt +++ b/trunk/CHANGELOG.txt @@ -12,6 +12,7 @@ Process Hacker * Shows function file and line numbers where available * FIXED: * #2785648 - "cursor down crashes PH" + * #2790404 - "System.InvalidOperationException" * Incomplete or inaccurate thread call stacks * Windows 7 BSOD * Crash upon executing terminator test M1 diff --git a/trunk/ProcessHacker/Components/ProcessTree/ProcessTreeModel.cs b/trunk/ProcessHacker/Components/ProcessTree/ProcessTreeModel.cs index 737a161f8..db5f8ec4d 100644 --- a/trunk/ProcessHacker/Components/ProcessTree/ProcessTreeModel.cs +++ b/trunk/ProcessHacker/Components/ProcessTree/ProcessTreeModel.cs @@ -59,8 +59,10 @@ namespace ProcessHacker // Add the process to the list of all processes. _processes.Add(item.Pid, itemNode); - // Find this process' children and add them. - foreach (ProcessNode node in _roots) + // Find this process' children and add them. + ProcessNode[] roots = _roots.ToArray(); + + foreach (ProcessNode node in roots) { if (node.ProcessItem.HasParent && node.PPid == item.Pid) {