diff --git a/cocos2dx/textures/CCTextureCache.cpp b/cocos2dx/textures/CCTextureCache.cpp index f79c06141e..ac89657ca0 100644 --- a/cocos2dx/textures/CCTextureCache.cpp +++ b/cocos2dx/textures/CCTextureCache.cpp @@ -198,7 +198,7 @@ void CCTextureCache::addImageAsync(const char *path, SelectorProtocol *target, S texture = m_pTextures->objectForKey(pathKey); std::string fullpath = pathKey; - if (texture = m_pTextures->objectForKey(pathKey)) + if (texture != NULL) { if (target && selector) {