mirror of
https://github.com/PaperMC/Paper.git
synced 2025-01-05 18:27:17 +01:00
#940: Fixed a NPE during CraftBlockEntityState#update.
When the BlockState's block type was changed, #update may have removed the TileEntity, causing #isApplicable to fail with a NPE. By: blablubbabc <lukas@wirsindwir.de>
This commit is contained in:
parent
571ec764a6
commit
f9c1420daf
1 changed files with 1 additions and 1 deletions
|
@ -82,7 +82,7 @@ public abstract class CraftBlockEntityState<T extends TileEntity> extends CraftB
|
|||
}
|
||||
|
||||
protected boolean isApplicable(TileEntity tileEntity) {
|
||||
return this.tileEntity.getClass() == tileEntity.getClass();
|
||||
return tileEntity != null && this.tileEntity.getClass() == tileEntity.getClass();
|
||||
}
|
||||
|
||||
@Override
|
||||
|
|
Loading…
Reference in a new issue