Skip to content

Commit

Permalink
Merge pull request #35 from guineawheek/fix_npe
Browse files Browse the repository at this point in the history
fix NPE crash with recent code change
  • Loading branch information
Dream-Master authored Nov 2, 2022
2 parents ccd3a5d + 7def78a commit 6da8cdf
Showing 1 changed file with 4 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -201,7 +201,10 @@ public boolean containsItems() {
}
if (p2p == invFluidsP2P || p2p == null)
continue;
tankInfos.add(Ae2Reflect.getP2PLiquidTarget(p2p).getTankInfo(p2p.getSide().getOpposite()));
IFluidHandler target = Ae2Reflect.getP2PLiquidTarget(p2p);
if (target == null)
continue;
tankInfos.add(target.getTankInfo(p2p.getSide().getOpposite()));
}
} catch (GridAccessException e) {
// ignore
Expand Down

0 comments on commit 6da8cdf

Please sign in to comment.