fixed nullpointer exception in RoomUnit.java

This commit is contained in:
skeletor 2020-03-13 10:47:20 -04:00 committed by Harmonic
parent 47e9d1a64b
commit 7ab78798b6

View File

@ -761,6 +761,8 @@ public class RoomUnit {
}
public RoomTile getClosestAdjacentTile(short x, short y, boolean diagonal) {
if(room == null) return null;
RoomTile baseTile = room.getLayout().getTile(x, y);
if (baseTile == null) return null;