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:
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 .
|
||||
*/
|
||||
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;
|
||||
|
|
Loading…
Add table
Reference in a new issue