mirror of
https://github.com/Qortal/altcoinj.git
synced 2025-11-03 05:57:21 +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
b6415663c9
commit
73fe9e6ab5
@@ -1002,7 +1002,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