mirror of
https://github.com/Qortal/altcoinj.git
synced 2025-07-31 20:11:23 +00:00
Block: Avoid NPE in hasTransactions()
Field is nullable; ```java @Nullable List<Transaction> transactions; ```
This commit is contained in:
committed by
Andreas Schildbach
parent
52d000b6f9
commit
0be938b4a7
@@ -1003,7 +1003,7 @@ public class Block extends Message {
|
|||||||
* purely a header).
|
* purely a header).
|
||||||
*/
|
*/
|
||||||
public boolean hasTransactions() {
|
public boolean hasTransactions() {
|
||||||
return !this.transactions.isEmpty();
|
return (this.transactions != null) && !this.transactions.isEmpty();
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
Reference in New Issue
Block a user