Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/views/console/ProcessConsole.java10
1 files changed, 7 insertions, 3 deletions
diff --git a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/views/console/ProcessConsole.java b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/views/console/ProcessConsole.java
index 2eba11757..69c8bb9fb 100644
--- a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/views/console/ProcessConsole.java
+++ b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/views/console/ProcessConsole.java
@@ -101,7 +101,7 @@ public class ProcessConsole extends IOConsole implements IConsole, IDebugEventSe
private IConsoleColorProvider fColorProvider;
- private InputStream fInput;
+ private volatile InputStream fInput;
private FileOutputStream fFileOutputStream;
@@ -729,8 +729,12 @@ public class ProcessConsole extends IOConsole implements IConsole, IDebugEventSe
try {
byte[] b = new byte[1024];
int read = 0;
- while (fInput != null && read >= 0) {
- read = fInput.read(b);
+ while (read >= 0) {
+ InputStream input = fInput;
+ if (input == null) {
+ break;
+ }
+ read = input.read(b);
if (read > 0) {
String s;
if (encoding != null) {

Back to the top