From f3a85ece4307a7b90816c34489d1ed2c8fd11baf Mon Sep 17 00:00:00 2001 From: Arnold <40414978+PatriceJiang@users.noreply.github.com> Date: Wed, 26 Dec 2018 22:21:41 +0800 Subject: [PATCH] fix spritecache plist parsing issue (#19269) --- cocos/2d/CCSpriteFrameCache.cpp | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/cocos/2d/CCSpriteFrameCache.cpp b/cocos/2d/CCSpriteFrameCache.cpp index 9f4b0c0dcd43..3a29fa7a81e8 100644 --- a/cocos/2d/CCSpriteFrameCache.cpp +++ b/cocos/2d/CCSpriteFrameCache.cpp @@ -375,6 +375,11 @@ void SpriteFrameCache::addSpriteFramesWithFile(const std::string& plist) { CCASSERT(!plist.empty(), "plist filename should not be nullptr"); + if (_spriteFramesCache.isPlistFull(plist)) + { + return; + } + std::string fullPath = FileUtils::getInstance()->fullPathForFilename(plist); if (fullPath.empty()) {