From d525e42479cb3d3ed71bdaa074cc019d1e05b6c6 Mon Sep 17 00:00:00 2001 From: Mario Zechner Date: Tue, 29 Nov 2022 09:09:36 +0100 Subject: [PATCH] [cpp] Reference attachments in Skin::addSkin(), closes #2203, closes #2202. --- spine-cpp/spine-cpp/src/spine/Skin.cpp | 1 + 1 file changed, 1 insertion(+) diff --git a/spine-cpp/spine-cpp/src/spine/Skin.cpp b/spine-cpp/spine-cpp/src/spine/Skin.cpp index ea4114c23..5f7a8a276 100644 --- a/spine-cpp/spine-cpp/src/spine/Skin.cpp +++ b/spine-cpp/spine-cpp/src/spine/Skin.cpp @@ -164,6 +164,7 @@ void Skin::addSkin(Skin *other) { AttachmentMap::Entries entries = other->getAttachments(); while (entries.hasNext()) { AttachmentMap::Entry &entry = entries.next(); + entry._attachment->reference(); setAttachment(entry._slotIndex, entry._name, entry._attachment); } }