From 927f05f6701a865b73400212b9eb793febf48e70 Mon Sep 17 00:00:00 2001 From: halx99 Date: Tue, 18 Aug 2020 14:43:09 +0800 Subject: [PATCH] Sync mssing code from official-v3 --- cocos/2d/CCSpriteFrameCache.cpp | 3 +++ 1 file changed, 3 insertions(+) diff --git a/cocos/2d/CCSpriteFrameCache.cpp b/cocos/2d/CCSpriteFrameCache.cpp index ac138571af..cdce3fb696 100644 --- a/cocos/2d/CCSpriteFrameCache.cpp +++ b/cocos/2d/CCSpriteFrameCache.cpp @@ -353,6 +353,9 @@ 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()) {