diff --git a/CHANGELOG b/CHANGELOG index 81416cfc94..6a3d593beb 100644 --- a/CHANGELOG +++ b/CHANGELOG @@ -4,6 +4,7 @@ cocos2d-x-3.0alpha1 @??? 2013 [FIX] Texture: use CCLOG to log when a texture is being decoded in software [FIX] Spine: fix memory leaks [FIX] fixed a memory leak in XMLHTTPRequest.cpp + [FIX] removeSpriteFramesFromFile() crashes if file doesn't exist. [Android] [FIX] Added EGL_RENDERABLE_TYPE to OpenGL attributes [NEW] Added Cocos2dxHelper.runOnGLThread(Runnable) again diff --git a/cocos2dx/sprite_nodes/CCSpriteFrameCache.cpp b/cocos2dx/sprite_nodes/CCSpriteFrameCache.cpp index 945cd30f32..1d19773c60 100644 --- a/cocos2dx/sprite_nodes/CCSpriteFrameCache.cpp +++ b/cocos2dx/sprite_nodes/CCSpriteFrameCache.cpp @@ -344,7 +344,11 @@ void SpriteFrameCache::removeSpriteFramesFromFile(const char* plist) { std::string fullPath = FileUtils::getInstance()->fullPathForFilename(plist); Dictionary* dict = Dictionary::createWithContentsOfFileThreadSafe(fullPath.c_str()); - + if (dict == nullptr) + { + CCLOG("cocos2d:SpriteFrameCache:removeSpriteFramesFromFile: create dict by %s fail.",plist); + return; + } removeSpriteFramesFromDictionary((Dictionary*)dict); // remove it from the cache diff --git a/samples/samples.xcodeproj/project.pbxproj.REMOVED.git-id b/samples/samples.xcodeproj/project.pbxproj.REMOVED.git-id index dc39ae6bd3..ec33bf839a 100644 --- a/samples/samples.xcodeproj/project.pbxproj.REMOVED.git-id +++ b/samples/samples.xcodeproj/project.pbxproj.REMOVED.git-id @@ -1 +1 @@ -d846dfb9965fecfad1f6fe6190516035158c4d53 \ No newline at end of file +381c282bed409f4b41a82505460d4d6c84ba70ab \ No newline at end of file