diff --git a/cocos/renderer/CCTextureCache.cpp b/cocos/renderer/CCTextureCache.cpp index 87ebe6195d..99f7dc4624 100644 --- a/cocos/renderer/CCTextureCache.cpp +++ b/cocos/renderer/CCTextureCache.cpp @@ -268,7 +268,11 @@ void TextureCache::addImageAsyncCallBack(float dt) texture = it->second; } - asyncStruct->callback(texture); + if (asyncStruct->callback) + { + asyncStruct->callback(texture); + } + if(image) { image->release();