v0.9.3a: added a null safety check to CellSelector

This commit is contained in:
Evan Debenham 2021-06-11 22:31:47 -04:00
parent 3f4513aa0d
commit 51dba1b588

View File

@ -264,6 +264,10 @@ public class CellSelector extends ScrollArea {
};
private boolean moveFromAction(GameAction action){
if (Dungeon.hero == null){
return false;
}
int cell = Dungeon.hero.pos;
if (action == SPDAction.N) cell += -Dungeon.level.width();