Fix crash loading terminal from disk

This commit is contained in:
Shadowfacts 2019-10-30 13:53:40 -04:00
parent f4f4c7ff03
commit 2a9fc29cdd
Signed by: shadowfacts
GPG Key ID: 94A5AB95422746E5
1 changed files with 1 additions and 1 deletions

View File

@ -163,7 +163,7 @@ class TerminalBlockEntity: DeviceBlockEntity(PhyBlockEntities.TERMINAL), Invento
}
override fun onInvChange(inv: Inventory) {
if (inv == internalBuffer && !world!!.isClient) {
if (inv == internalBuffer && world != null && !world!!.isClient) {
markDirty()
sync()
}