diff options
author | Miguel de Icaza <miguel@gnome.org> | 2009-04-20 07:57:44 +0400 |
---|---|---|
committer | Miguel de Icaza <miguel@gnome.org> | 2009-04-20 07:57:44 +0400 |
commit | 401337e29703e6ec6c374e2a0eaa9cfc568d3db6 (patch) | |
tree | af7507a9fd2b6a26bdfa4717bc64442b82748c14 /mcs/class/System/System.Diagnostics/Process.cs | |
parent | f549ba4f016fedafc563c15aa1eb282bf09b2426 (diff) |
2009-04-19 Miguel de Icaza <miguel@novell.com>
* Process.cs: Do not crash if GetProcesses_internal returns null
This happens on operating systems where we have not implemented
svn path=/trunk/mcs/; revision=132110
Diffstat (limited to 'mcs/class/System/System.Diagnostics/Process.cs')
-rw-r--r-- | mcs/class/System/System.Diagnostics/Process.cs | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/mcs/class/System/System.Diagnostics/Process.cs b/mcs/class/System/System.Diagnostics/Process.cs index 0f511250be2..5db07962592 100644 --- a/mcs/class/System/System.Diagnostics/Process.cs +++ b/mcs/class/System/System.Diagnostics/Process.cs @@ -857,6 +857,9 @@ namespace System.Diagnostics { { int [] pids = GetProcesses_internal (); ArrayList proclist = new ArrayList (); + + if (pids == null) + return new Process [0]; for (int i = 0; i < pids.Length; i++) { try { |