diff --git a/spine-cpp/spine-cpp/src/spine/Slot.cpp b/spine-cpp/spine-cpp/src/spine/Slot.cpp index 220707bed..34f69ace7 100644 --- a/spine-cpp/spine-cpp/src/spine/Slot.cpp +++ b/spine-cpp/spine-cpp/src/spine/Slot.cpp @@ -99,15 +99,12 @@ void Slot::setAttachment(Attachment *inValue) { return; } - if (!inValue || !_attachment) { + if (!inValue || + !_attachment || + !inValue->getRTTI().instanceOf(VertexAttachment::rtti) || + !_attachment->getRTTI().instanceOf(VertexAttachment::rtti) || + static_cast(inValue)->getDeformAttachment() != static_cast(_attachment)->getDeformAttachment()) { _deform.clear(); - } else { - if (!(inValue->getRTTI().instanceOf(VertexAttachment::rtti)) || - !(_attachment->getRTTI().instanceOf(VertexAttachment::rtti)) || - (static_cast(inValue)->getDeformAttachment() != - (static_cast(_attachment)->getDeformAttachment()))) { - _deform.clear(); - } } _attachment = inValue;