From ae7ca98b8e965e13c8cbc96c4a9fa844ea748928 Mon Sep 17 00:00:00 2001 From: NathanSweet Date: Sat, 27 Aug 2016 14:53:02 +0200 Subject: [PATCH] Allow attachment loader to return null. --- .../src/com/esotericsoftware/spine/SkeletonBinary.java | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/spine-libgdx/spine-libgdx/src/com/esotericsoftware/spine/SkeletonBinary.java b/spine-libgdx/spine-libgdx/src/com/esotericsoftware/spine/SkeletonBinary.java index aa0c320cf..aa4ed70f0 100644 --- a/spine-libgdx/spine-libgdx/src/com/esotericsoftware/spine/SkeletonBinary.java +++ b/spine-libgdx/spine-libgdx/src/com/esotericsoftware/spine/SkeletonBinary.java @@ -318,7 +318,8 @@ public class SkeletonBinary { int slotIndex = input.readInt(true); for (int ii = 0, nn = input.readInt(true); ii < nn; ii++) { String name = input.readString(); - skin.addAttachment(slotIndex, name, readAttachment(input, skin, slotIndex, name, nonessential)); + Attachment attachment = readAttachment(input, skin, slotIndex, name, nonessential); + if (attachment != null) skin.addAttachment(slotIndex, name, attachment); } } return skin;