add null check

This commit is contained in:
brenoepic 2022-04-15 15:41:32 -03:00
parent 9e1e90f4f1
commit d9d24d9073

View File

@ -121,7 +121,7 @@ public class FloorPlanEditorSaveEvent extends MessageHandler {
}
}
if (tile.state != RoomTileState.INVALID && height != tile.z && room.getTopItemAt(x, y) != null) {
if (tile != null && tile.state != RoomTileState.INVALID && height != tile.z && room.getTopItemAt(x, y) != null) {
errors.add("${notification.floorplan_editor.error.message.change_blocked_by_room_item}");
break blockingRoomItemScan;
}