Skip to content

Commit d84d668

Browse files
authored
Fix spine crash when exiting game. (#18506)
It's a bug after merging #18467
1 parent 6114a56 commit d84d668

File tree

2 files changed

+2
-0
lines changed

2 files changed

+2
-0
lines changed

native/cocos/editor-support/spine-creator-support/SkeletonCacheAnimation.cpp

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -85,6 +85,7 @@ SkeletonCacheAnimation::~SkeletonCacheAnimation() {
8585
for (auto &item : _materialCaches) {
8686
CC_SAFE_DELETE(item.second);
8787
}
88+
_entity = nullptr;
8889
stopSchedule();
8990
}
9091

native/cocos/editor-support/spine-creator-support/SkeletonRenderer.cpp

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -174,6 +174,7 @@ SkeletonRenderer::~SkeletonRenderer() {
174174
CC_SAFE_DELETE(item.second);
175175
}
176176

177+
_entity = nullptr;
177178
stopSchedule();
178179
}
179180

0 commit comments

Comments
 (0)