get image data from internet and success to create an image, but show all white in layer as a sprite

I use image.saveToFile(“C:/aab.jpg”) to save it in local disk, and it shows correct.
Any possible reason will make this happen? a correct image but a wrong sprite.

below is my code:

do
{
CCImage image;
CC_BREAK_IF(! image.initWithImageData((void*)pBuffer, nSize, imageType));
image.saveToFile(“C:/aab.jpg”);
texture = new CCTexture2D();
texture~~>initWithImage;
if
{
if
{
#if CC_ENABLE_CACHE_TEXTTURE_DATA
// cache the texture file name
VolatileTexture::addImageTexture;
#endif
m_pTextures~~>setObject(texture, key);
}
// autorelease prevents possible crash in multithreaded environments
texture->autorelease();
}
else
{
CCLOG (“cocos2d: Couldn’t add image data in CCTextureCache.”);
}
}
while(0);

This is your codes or you hack engine to add your codes?

Minggo Zhang wrote:

This is your codes or you hack engine to add your codes?

I’ve found out what’s wrong. it’s all because the mult-thread, and opengl could not work well, my mistake, lol.