From fd37d1b7767a6a58644c61ad3999827b1171c355 Mon Sep 17 00:00:00 2001 From: Evan Debenham Date: Fri, 4 Nov 2016 02:41:36 -0400 Subject: [PATCH] v0.4.3b: undid respositioning of static scene variable, added safety check for toolbar declaration --- .../shatteredpixeldungeon/scenes/GameScene.java | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/scenes/GameScene.java b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/scenes/GameScene.java index 1753f8b75..e34d6622b 100644 --- a/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/scenes/GameScene.java +++ b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/scenes/GameScene.java @@ -156,6 +156,8 @@ public class GameScene extends PixelScene { super.create(); Camera.main.zoom( GameMath.gate(minZoom, defaultZoom + ShatteredPixelDungeon.zoom(), maxZoom)); + scene = this; + terrain = new Group(); add( terrain ); @@ -379,7 +381,6 @@ public class GameScene extends PixelScene { fadeIn(); } - scene = this; } public void destroy() { @@ -807,7 +808,7 @@ public class GameScene extends PixelScene { public static void ready() { selectCell( defaultCellListener ); QuickSlotButton.cancel(); - if (scene != null) scene.toolbar.examining = false; + if (scene != null && scene.toolbar != null) scene.toolbar.examining = false; } public static void examineCell( Integer cell ) {