This commit is contained in:
Ming 2010-10-11 10:05:34 +00:00
parent 4957c72a0d
commit 7a9b417248
2 changed files with 3 additions and 1 deletions

View File

@ -23,7 +23,7 @@ THE SOFTWARE.
****************************************************************************/ ****************************************************************************/
#ifndef __CCRIBBON_H__ #ifndef __CCRIBBON_H__
#define __CCRIBBON_H__ #define __CCRIBBON_H__
#include <gles/egl.h> #include <GLES/egl.h>
#include "CCNode.h" #include "CCNode.h"
#include "CCProtocols.h" #include "CCProtocols.h"
namespace cocos2d { namespace cocos2d {

View File

@ -210,6 +210,7 @@ CCTexture2D * CCTextureCache::addImage(const char * path)
if(! image->initWithContentsOfFile(fullpath, kImageFormatJPG)) if(! image->initWithContentsOfFile(fullpath, kImageFormatJPG))
{ {
delete image; delete image;
m_pDictLock->unlock();
return NULL; return NULL;
} }
texture = new CCTexture2D(); texture = new CCTexture2D();
@ -238,6 +239,7 @@ CCTexture2D * CCTextureCache::addImage(const char * path)
if(! image->initWithContentsOfFile(fullpath, kImageFormatPNG)) if(! image->initWithContentsOfFile(fullpath, kImageFormatPNG))
{ {
delete image; delete image;
m_pDictLock->unlock();
return NULL; return NULL;
} }
texture = new CCTexture2D(); texture = new CCTexture2D();