From 401337e29703e6ec6c374e2a0eaa9cfc568d3db6 Mon Sep 17 00:00:00 2001 From: Miguel de Icaza Date: Mon, 20 Apr 2009 03:57:44 +0000 Subject: 2009-04-19 Miguel de Icaza * 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 --- mcs/class/System/System.Diagnostics/Process.cs | 3 +++ 1 file changed, 3 insertions(+) (limited to 'mcs/class/System/System.Diagnostics/Process.cs') 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 { -- cgit v1.2.3