From bde351dda7bb41f7efaa2c6529f605fe254f62a7 Mon Sep 17 00:00:00 2001 From: James Chen Date: Wed, 27 Jun 2012 15:04:42 +0800 Subject: [PATCH] fixed a bug in CCSpriteFrame::getTexture. if( m_strTextureFilename.length() <= 0 ) // logic error, must be > 0 { return CCTextureCache::sharedTextureCache()->addImage(m_strTextureFilename.c_str()); } --- cocos2dx/sprite_nodes/CCSpriteFrame.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cocos2dx/sprite_nodes/CCSpriteFrame.cpp b/cocos2dx/sprite_nodes/CCSpriteFrame.cpp index e343530329..461606b6f2 100644 --- a/cocos2dx/sprite_nodes/CCSpriteFrame.cpp +++ b/cocos2dx/sprite_nodes/CCSpriteFrame.cpp @@ -199,7 +199,7 @@ CCTexture2D* CCSpriteFrame::getTexture(void) return m_pobTexture; } - if( m_strTextureFilename.length() <= 0 ) { + if( m_strTextureFilename.length() > 0 ) { return CCTextureCache::sharedTextureCache()->addImage(m_strTextureFilename.c_str()); } // no texture or texture filename