Browse Source

Fixed NPE when attempting to lookup a block signature that doesn't exist.

bootstrap
CalDescent 3 years ago
parent
commit
114833cf8e
  1. 2
      src/main/java/org/qortal/repository/BlockArchiveReader.java

2
src/main/java/org/qortal/repository/BlockArchiveReader.java

@ -126,7 +126,7 @@ public class BlockArchiveReader {
// Lookup the height for the requested signature
try {
BlockArchiveData archivedBlock = repository.getBlockArchiveRepository().getBlockArchiveDataForSignature(signature);
if (archivedBlock.getHeight() == null) {
if (archivedBlock == null) {
return null;
}
return archivedBlock.getHeight();

Loading…
Cancel
Save