mirror of https://github.com/axmolengine/axmol.git
Merge pull request #1097 from walzer/gles20
fixed #1095 on github issue, which is issue #1395 in cocos2d-x issue system
This commit is contained in:
commit
3ea9874e2f
|
@ -444,9 +444,9 @@ CCTexture2D * CCTextureCache::addImage(const char * path)
|
||||||
CC_SAFE_DELETE_ARRAY(pBuffer);
|
CC_SAFE_DELETE_ARRAY(pBuffer);
|
||||||
|
|
||||||
texture = new CCTexture2D();
|
texture = new CCTexture2D();
|
||||||
texture->initWithImage(&image, resolution);
|
|
||||||
|
|
||||||
if( texture )
|
if( texture &&
|
||||||
|
texture->initWithImage(&image, resolution) )
|
||||||
{
|
{
|
||||||
#if CC_ENABLE_CACHE_TEXTURE_DATA
|
#if CC_ENABLE_CACHE_TEXTURE_DATA
|
||||||
// cache the texture file name
|
// cache the texture file name
|
||||||
|
|
Loading…
Reference in New Issue