[develop] Minor fix for CCSprite::draw(), checking whether texture is valid, if it's invalid, don't set the attribute for it.

Fix from master branch.