v0.9.3a: added a null safety check to CellSelector
This commit is contained in:
@@ -264,6 +264,10 @@ public class CellSelector extends ScrollArea {
|
|||||||
};
|
};
|
||||||
|
|
||||||
private boolean moveFromAction(GameAction action){
|
private boolean moveFromAction(GameAction action){
|
||||||
|
if (Dungeon.hero == null){
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
int cell = Dungeon.hero.pos;
|
int cell = Dungeon.hero.pos;
|
||||||
|
|
||||||
if (action == SPDAction.N) cell += -Dungeon.level.width();
|
if (action == SPDAction.N) cell += -Dungeon.level.width();
|
||||||
|
|||||||
Reference in New Issue
Block a user