From 0cc15d9a6963a0ab5d6bae62919c9ef9ed5c8675 Mon Sep 17 00:00:00 2001 From: Evan Debenham Date: Sun, 11 Jun 2017 15:41:16 -0400 Subject: [PATCH] v0.6.0b: fixed crashes when gamescene closed while waiting on animations --- .../shatteredpixeldungeon/actors/Actor.java | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/actors/Actor.java b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/actors/Actor.java index 7834abc70..e229ced3e 100644 --- a/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/actors/Actor.java +++ b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/actors/Actor.java @@ -216,11 +216,15 @@ public abstract class Actor implements Bundlable { interrupted = interrupted || Thread.interrupted(); - doNext = !interrupted && acting.act(); - - if (doNext && !Dungeon.hero.isAlive()) { + if (interrupted){ doNext = false; current = null; + } else { + doNext = acting.act(); + if (doNext && !Dungeon.hero.isAlive()) { + doNext = false; + current = null; + } } } else { doNext = false;