Merge pull request #963 from kebby/master
[mono.git] / mcs / class / System / System.Diagnostics / Process.cs
index 7a63ce0377c62529dbf33b5f8c9718d401f74ff9..af427037b285cfc9ae8e1b4e7aa7183d1fddc04b 100644 (file)
@@ -1514,8 +1514,8 @@ namespace System.Diagnostics {
                [ComVisibleAttribute(false)] 
                public void CancelErrorRead ()
                {
-                       if (process_handle == IntPtr.Zero || output_stream == null || StartInfo.RedirectStandardOutput == false)
-                               throw new InvalidOperationException ("Standard output has not been redirected or process has not been started.");
+                       if (process_handle == IntPtr.Zero || error_stream == null || StartInfo.RedirectStandardError == false)
+                               throw new InvalidOperationException ("Standard error has not been redirected or process has not been started.");
 
                        if ((async_mode & AsyncModes.SyncOutput) != 0)
                                throw new InvalidOperationException ("OutputStream is not enabled for asynchronous read operations.");