v2.2.0: added a safety check for CharSprite moving

This commit is contained in:
Evan Debenham
2023-10-06 13:15:34 -04:00
parent fbebb12d93
commit dfa2b1c16e
@@ -266,7 +266,7 @@ public abstract class Char extends Actor {
protected boolean moveSprite( int from, int to ) {
if (sprite.isVisible() && (Dungeon.level.heroFOV[from] || Dungeon.level.heroFOV[to])) {
if (sprite.isVisible() && sprite.parent != null && (Dungeon.level.heroFOV[from] || Dungeon.level.heroFOV[to])) {
sprite.move( from, to );
return true;
} else {