Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 5 additions & 1 deletion cocos/2d/CCSpriteFrameCache.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -762,8 +762,12 @@ bool SpriteFrameCache::PlistFramesCache::eraseFrame(const std::string &frame)
auto itFrame = _indexFrame2plist.find(frame);
if (itFrame != _indexFrame2plist.end())
{
_indexPlist2Frames[itFrame->second].erase(frame); //update index plist->[frameNames]
auto plist = itFrame->second;
_indexPlist2Frames[plist].erase(frame); //update index plist->[frameNames]
_indexFrame2plist.erase(itFrame); //update index frame->plist
// erase plist index if all frames was erased
if (_indexFrame2plist.empty())
_indexPlist2Frames.erase(plist);
return true;
}
return false;
Expand Down
Binary file modified tests/cpp-tests/Resources/Images/island_polygon.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified tests/cpp-tests/Resources/Images/sprite_frames_test/test_A8.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified tests/cpp-tests/Resources/Images/sprite_polygon_crash.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.