Fix possible NPE in TankManager
This commit is contained in:
parent
1253534535
commit
87bb24e263
1 changed files with 1 additions and 1 deletions
|
@ -112,7 +112,7 @@ public class TankManager<T extends Tank> extends ForwardingList<T> implements IF
|
|||
public void writeData(DataOutputStream data) throws IOException {
|
||||
for (Tank tank : tanks) {
|
||||
FluidStack fluidStack = tank.getFluid();
|
||||
if (fluidStack != null) {
|
||||
if (fluidStack != null && fluidStack.getFluid() != null) {
|
||||
data.writeShort(fluidStack.getFluid().getID());
|
||||
data.writeInt(fluidStack.amount);
|
||||
} else {
|
||||
|
|
Loading…
Reference in a new issue