Prevent EmptyStackException

This commit is contained in:
Anthony Calosa
2020-04-15 13:43:58 +08:00
parent 2778318b10
commit 427e34607d

View File

@@ -635,8 +635,10 @@ public class Graphics {
public void endTransform() {
batch.end();
batch.getTransformMatrix().set(transforms.pop());
shapeRenderer.setTransformMatrix(batch.getTransformMatrix());
if (!transforms.empty()) { //??? EmptyStackException encountered on mobile
batch.getTransformMatrix().set(transforms.pop());
shapeRenderer.setTransformMatrix(batch.getTransformMatrix());
}
batch.begin();
}