1
0
Fork 0
mirror of https://github.com/eclipse-cdt/cdt synced 2025-04-23 22:52:11 +02:00

Check if the buffer is not null

This commit is contained in:
Alain Magloire 2002-12-10 16:18:57 +00:00
parent afd9ccc753
commit 59a9567fee

View file

@ -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;