From 6af7ad9280fb8f8b955e81ccd1c69dbf178ee3e9 Mon Sep 17 00:00:00 2001 From: wj32 Date: Tue, 12 May 2009 03:30:09 +0000 Subject: [PATCH] #2790404 - "System.InvalidOperationException" git-svn-id: svn://svn.code.sf.net/p/processhacker/code@1266 21ef857c-d57f-4fe0-8362-d861dc6d29cd --- trunk/CHANGELOG.txt | 1 + .../Components/ProcessTree/ProcessTreeModel.cs | 6 ++++-- 2 files changed, 5 insertions(+), 2 deletions(-) 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) {