Commit 469f1439 authored by Vitaliy Vashchenko's avatar Vitaliy Vashchenko

#914 fixed unfolding while changing round causing NPE.

parent 9e4aabb1
......@@ -165,14 +165,14 @@ public class RunesHolder extends Group {
}
public void unfold() {
if (folded) {
if (folded && getStage() != null) {
for (Actor a : getChildren()) {
a.setTouchable(Touchable.enabled);
}
setTouchable(Touchable.childrenOnly);
toFront();
prevX = getX();
float stageWidth = getStage().getWidth() * (1-RunesGame.SIDEBAR_RELATIVE_WIDTH);
float stageWidth = getStage().getWidth() * (1 - RunesGame.SIDEBAR_RELATIVE_WIDTH);
float prevMid = prevX + getWidth() * 0.5f * getScaleX();
setScale(UNFOLDED_SCALE);
float newX = prevMid - getWidth() * getScaleX() * 0.5f;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment