diff options
author | Dmitry Zaporozhan <dzaporozhan@productengine.com> | 2009-11-18 10:04:08 +0200 |
---|---|---|
committer | Dmitry Zaporozhan <dzaporozhan@productengine.com> | 2009-11-18 10:04:08 +0200 |
commit | da2a0cfceb9fbc7c66f23f8820309f36b6629530 (patch) | |
tree | 1a2c93b5d42bc87d79b9b53ea8f38673706d92e6 /indra/newview/llvlcomposition.cpp | |
parent | 471897cfabbfec8d4dbee65c837d5884310ea61a (diff) | |
parent | c76ab6c4b7384e34a4f32f2fa820b46f6373cdc3 (diff) |
Merge
--HG--
branch : product-engine
Diffstat (limited to 'indra/newview/llvlcomposition.cpp')
-rw-r--r-- | indra/newview/llvlcomposition.cpp | 13 |
1 files changed, 9 insertions, 4 deletions
diff --git a/indra/newview/llvlcomposition.cpp b/indra/newview/llvlcomposition.cpp index 999701ece1..6340189c93 100644 --- a/indra/newview/llvlcomposition.cpp +++ b/indra/newview/llvlcomposition.cpp @@ -287,17 +287,22 @@ BOOL LLVLComposition::generateTexture(const F32 x, const F32 y, min_dim /= 2; } - mDetailTextures[i]->reloadRawImage(ddiscard) ; + BOOL delete_raw = (mDetailTextures[i]->reloadRawImage(ddiscard) != NULL) ; if(mDetailTextures[i]->getRawImageLevel() != ddiscard)//raw iamge is not ready, will enter here again later. { - mDetailTextures[i]->destroyRawImage() ; + if(delete_raw) + { + mDetailTextures[i]->destroyRawImage() ; + } lldebugs << "cached raw data for terrain detail texture is not ready yet: " << mDetailTextures[i]->getID() << llendl; return FALSE; } mRawImages[i] = mDetailTextures[i]->getRawImage() ; - mDetailTextures[i]->destroyRawImage() ; - + if(delete_raw) + { + mDetailTextures[i]->destroyRawImage() ; + } if (mDetailTextures[i]->getWidth(ddiscard) != BASE_SIZE || mDetailTextures[i]->getHeight(ddiscard) != BASE_SIZE || mDetailTextures[i]->getComponents() != 3) |