Fix: NPE when moving non-saved-survival-state

This commit is contained in:
Jascha Starke 2013-09-21 10:23:04 +02:00
parent acbe6838b7
commit ed809b5b18

View file

@ -27,7 +27,7 @@ public class DBModel {
q.delete(to.getLocation());
q.move(from.getLocation(), to.getLocation());
HasBlockState metaBlock = getMetaBlock(from);
if (metaBlock.set) {
if (metaBlock.set && metaBlock.state != null) {
BlockState state = metaBlock.state;
state.setLocation(to.getLocation());
setMetaBlock(to, getMetaBlock(from).state);