forked from I2P_Developers/i2p.i2p
* PeerManager: Fix NPE on Android (ticket #687)
This commit is contained in:
@ -125,6 +125,8 @@ public abstract class BasePRNGStandalone implements IRandomStandalone {
|
||||
throw new ArrayIndexOutOfBoundsException("offset=" + offset + " length="
|
||||
+ length + " limit=" + out.length);
|
||||
|
||||
if (buffer == null)
|
||||
throw new IllegalStateException("Random is shut down - do you have a static ref?");
|
||||
if (ndx >= buffer.length) {
|
||||
fillBlock();
|
||||
ndx = 0;
|
||||
@ -162,6 +164,8 @@ public abstract class BasePRNGStandalone implements IRandomStandalone {
|
||||
}
|
||||
|
||||
private byte nextByteInternal() {//throws LimitReachedException {
|
||||
if (buffer == null)
|
||||
throw new IllegalStateException("Random is shut down - do you have a static ref?");
|
||||
if (ndx >= buffer.length) {
|
||||
this.fillBlock();
|
||||
ndx = 0;
|
||||
|
Reference in New Issue
Block a user