فهرست منبع

[cpp] Reference attachments in Skin::addSkin(), closes #2203, closes #2202.

Mario Zechner 2 سال پیش
والد
کامیت
d525e42479
1فایلهای تغییر یافته به همراه1 افزوده شده و 0 حذف شده
  1. 1 0
      spine-cpp/spine-cpp/src/spine/Skin.cpp

+ 1 - 0
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);
 	}
 }