From 59a9567fee21448d0efa6ef7f6b64b751da86bf3 Mon Sep 17 00:00:00 2001 From: Alain Magloire Date: Tue, 10 Dec 2002 16:18:57 +0000 Subject: [PATCH] Check if the buffer is not null --- .../src/org/eclipse/cdt/core/CommandLauncher.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/core/org.eclipse.cdt.core/src/org/eclipse/cdt/core/CommandLauncher.java b/core/org.eclipse.cdt.core/src/org/eclipse/cdt/core/CommandLauncher.java index d7baa752288..1d89411ea8b 100644 --- a/core/org.eclipse.cdt.core/src/org/eclipse/cdt/core/CommandLauncher.java +++ b/core/org.eclipse.cdt.core/src/org/eclipse/cdt/core/CommandLauncher.java @@ -141,7 +141,7 @@ public class CommandLauncher { * When the ring buffer when full it returns 0 . */ public synchronized int available() throws IOException { - if(in < 0) + if(in < 0 || buffer == null) return 0; else if(in == out) return buffer.length; @@ -158,7 +158,7 @@ public class CommandLauncher { * When the ring buffer when full returns 0. */ public synchronized int available() throws IOException { - if(in < 0) + if(in < 0 || buffer == null) return 0; else if(in == out) return buffer.length;