From 50bfb3ae0f9abf64567cd5f311b54a8f8989c24a Mon Sep 17 00:00:00 2001 From: NathanSweet Date: Sat, 9 Mar 2019 15:10:25 +0100 Subject: [PATCH] [libgdx] Fixed NPE in AnimationState, javadoc. --- .../src/com/esotericsoftware/spine/AnimationState.java | 4 ++-- .../spine-libgdx/src/com/esotericsoftware/spine/Slot.java | 3 +-- .../esotericsoftware/spine/attachments/VertexAttachment.java | 4 ++-- 3 files changed, 5 insertions(+), 6 deletions(-) diff --git a/spine-libgdx/spine-libgdx/src/com/esotericsoftware/spine/AnimationState.java b/spine-libgdx/spine-libgdx/src/com/esotericsoftware/spine/AnimationState.java index 1fcac711b..cfe6910e1 100644 --- a/spine-libgdx/spine-libgdx/src/com/esotericsoftware/spine/AnimationState.java +++ b/spine-libgdx/spine-libgdx/src/com/esotericsoftware/spine/AnimationState.java @@ -712,10 +712,10 @@ public class AnimationState { propertyIDs.clear(2048); for (int i = tracks.size - 1; i >= 0; i--) { TrackEntry entry = tracks.get(i); - do { + while (entry != null) { computeNotLast(entry); entry = entry.mixingFrom; - } while (entry != null); + } } } diff --git a/spine-libgdx/spine-libgdx/src/com/esotericsoftware/spine/Slot.java b/spine-libgdx/spine-libgdx/src/com/esotericsoftware/spine/Slot.java index c9706a6c7..d6267bf7b 100644 --- a/spine-libgdx/spine-libgdx/src/com/esotericsoftware/spine/Slot.java +++ b/spine-libgdx/spine-libgdx/src/com/esotericsoftware/spine/Slot.java @@ -102,8 +102,7 @@ public class Slot { return attachment; } - /** Sets the slot's attachment and, if the attachment changed, resets {@link #attachmentTime} and clears - * {@link #attachmentVertices}. + /** Sets the slot's attachment and, if the attachment changed, resets {@link #attachmentTime} and clears {@link #deform}. * @param attachment May be null. */ public void setAttachment (Attachment attachment) { if (this.attachment == attachment) return; diff --git a/spine-libgdx/spine-libgdx/src/com/esotericsoftware/spine/attachments/VertexAttachment.java b/spine-libgdx/spine-libgdx/src/com/esotericsoftware/spine/attachments/VertexAttachment.java index c08d171b5..90991fa15 100644 --- a/spine-libgdx/spine-libgdx/src/com/esotericsoftware/spine/attachments/VertexAttachment.java +++ b/spine-libgdx/spine-libgdx/src/com/esotericsoftware/spine/attachments/VertexAttachment.java @@ -50,8 +50,8 @@ public class VertexAttachment extends Attachment { super(name); } - /** Transforms the attachment's local {@link #getVertices()} to world coordinates. If the slot has {@link Slot#getDeform()}, - * they are used to deform the vertices. + /** Transforms the attachment's local {@link #getVertices()} to world coordinates. If the slot's {@link Slot#getDeform()} is + * not empty, it is used to deform the vertices. *

* See World transforms in the Spine * Runtimes Guide.