diff --git a/cocos/base/ZipUtils.cpp b/cocos/base/ZipUtils.cpp index 101cc8090f90..0ca915e14b22 100644 --- a/cocos/base/ZipUtils.cpp +++ b/cocos/base/ZipUtils.cpp @@ -267,7 +267,7 @@ int ZipUtils::inflateGZipFile(const char *path, unsigned char **out) unsigned int totalBufferSize = bufferSize; *out = (unsigned char*)malloc( bufferSize ); - if( ! out ) + if(*out == NULL) { CCLOG("cocos2d: ZipUtils: out of memory"); return -1;