Skip to content

Commit

Permalink
Missing check for null.
Browse files Browse the repository at this point in the history
  • Loading branch information
asofold committed Nov 30, 2016
1 parent f5396e5 commit cc52581
Showing 1 changed file with 5 additions and 3 deletions.
Expand Up @@ -856,9 +856,11 @@ public BlockChangeEntry getBlockChangeEntry(final BlockChangeReference ref, fina
}
// TODO: Might add some policy (start at age, oldest first, newest first).
final LinkedList<BlockChangeEntry> entries = getValidBlockChangeEntries(tick, worldNode, x, y, z);
for (final BlockChangeEntry entry : entries) {
if (ref == null || ref.canUpdateWith(entry) && (direction == null || entry.direction == direction)) {
return entry;
if (entries != null) {
for (final BlockChangeEntry entry : entries) {
if (ref == null || ref.canUpdateWith(entry) && (direction == null || entry.direction == direction)) {
return entry;
}
}
}
return null;
Expand Down

0 comments on commit cc52581

Please sign in to comment.