fixed a bug in CCSpriteFrame::getTexture.

if( m_strTextureFilename.length() <= 0 ) // logic error, must be > 0
    {
        return CCTextureCache::sharedTextureCache()->addImage(m_strTextureFilename.c_str());
    }
This commit is contained in:
James Chen 2012-06-27 15:04:42 +08:00
parent a901b0bb12
commit bde351dda7
1 changed files with 1 additions and 1 deletions

View File

@ -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