Fixed NullPointerException

This commit is contained in:
iryupnik 2020-03-05 11:33:04 +02:00
parent 4a5e5501e5
commit d32861393c

View File

@ -25,6 +25,7 @@ public class Map {
moveToCells = new LinkedList<EventMoveToCell>(); moveToCells = new LinkedList<EventMoveToCell>();
block = new LinkedList<Block>(); block = new LinkedList<Block>();
isBlocked = false; isBlocked = false;
imageCell = new ImageCell();
TypeOfCell type; TypeOfCell type;
if (isBlocked) if (isBlocked)
@ -50,6 +51,7 @@ public class Map {
block = new LinkedList<Block>(); block = new LinkedList<Block>();
mapArray = new TypeOfCell[height][width]; mapArray = new TypeOfCell[height][width];
this.isBlocked = isBlocked; this.isBlocked = isBlocked;
imageCell = new ImageCell();
TypeOfCell type; TypeOfCell type;
if (isBlocked) if (isBlocked)