Skip to content

Commit 9fadf4e

Browse files
authored
fix spritecache plist parsing issue (#19269)
1 parent c9e4cb2 commit 9fadf4e

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

cocos/2d/CCSpriteFrameCache.cpp

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -375,6 +375,11 @@ void SpriteFrameCache::addSpriteFramesWithFile(const std::string& plist)
375375
{
376376
CCASSERT(!plist.empty(), "plist filename should not be nullptr");
377377

378+
if (_spriteFramesCache.isPlistFull(plist))
379+
{
380+
return;
381+
}
382+
378383
std::string fullPath = FileUtils::getInstance()->fullPathForFilename(plist);
379384
if (fullPath.empty())
380385
{

0 commit comments

Comments
 (0)