mirror of
https://github.com/eclipse-cdt/cdt
synced 2025-06-05 16:56:04 +02:00
Check if the buffer is not null
This commit is contained in:
parent
afd9ccc753
commit
59a9567fee
1 changed files with 2 additions and 2 deletions
|
@ -141,7 +141,7 @@ public class CommandLauncher {
|
||||||
* When the ring buffer when full it returns 0 .
|
* When the ring buffer when full it returns 0 .
|
||||||
*/
|
*/
|
||||||
public synchronized int available() throws IOException {
|
public synchronized int available() throws IOException {
|
||||||
if(in < 0)
|
if(in < 0 || buffer == null)
|
||||||
return 0;
|
return 0;
|
||||||
else if(in == out)
|
else if(in == out)
|
||||||
return buffer.length;
|
return buffer.length;
|
||||||
|
@ -158,7 +158,7 @@ public class CommandLauncher {
|
||||||
* When the ring buffer when full returns 0.
|
* When the ring buffer when full returns 0.
|
||||||
*/
|
*/
|
||||||
public synchronized int available() throws IOException {
|
public synchronized int available() throws IOException {
|
||||||
if(in < 0)
|
if(in < 0 || buffer == null)
|
||||||
return 0;
|
return 0;
|
||||||
else if(in == out)
|
else if(in == out)
|
||||||
return buffer.length;
|
return buffer.length;
|
||||||
|
|
Loading…
Add table
Reference in a new issue