diff --git a/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/ui/ActionIndicator.java b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/ui/ActionIndicator.java index 7b81cb4e9..ca43d7580 100644 --- a/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/ui/ActionIndicator.java +++ b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/ui/ActionIndicator.java @@ -48,7 +48,7 @@ public class ActionIndicator extends Tag { } @Override - protected void layout() { + protected synchronized void layout() { super.layout(); if (icon != null){ @@ -63,7 +63,7 @@ public class ActionIndicator extends Tag { private boolean needsLayout = false; @Override - public void update() { + public synchronized void update() { super.update(); if (!Dungeon.hero.ready){ @@ -104,13 +104,15 @@ public class ActionIndicator extends Tag { public static void updateIcon(){ if (instance != null){ - if (instance.icon != null){ - instance.icon.killAndErase(); - instance.icon = null; - } - if (action != null){ - instance.icon = action.getIcon(); - instance.needsLayout = true; + synchronized (instance) { + if (instance.icon != null) { + instance.icon.killAndErase(); + instance.icon = null; + } + if (action != null) { + instance.icon = action.getIcon(); + instance.needsLayout = true; + } } } } diff --git a/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/windows/WndGame.java b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/windows/WndGame.java index da584f543..49457e6c1 100644 --- a/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/windows/WndGame.java +++ b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/windows/WndGame.java @@ -76,7 +76,7 @@ public class WndGame extends Window { protected void onClick() { GamesInProgress.selectedClass = Dungeon.hero.heroClass; InterlevelScene.noStory = true; - ShatteredPixelDungeon.scene().add(new WndStartGame(GamesInProgress.firstEmpty())); + GameScene.show(new WndStartGame(GamesInProgress.firstEmpty())); } } ); btnStart.textColor(Window.TITLE_COLOR);