diff options
| author | Tofu Linden <tofu.linden@lindenlab.com> | 2009-11-17 09:28:26 +0000 |
|---|---|---|
| committer | Tofu Linden <tofu.linden@lindenlab.com> | 2009-11-17 09:28:26 +0000 |
| commit | a402f4894d72209f9ac9bc9d7962c28b3c26bb18 (patch) | |
| tree | 1db4f4a35008b6f4281e6275b7a4beb679d285d6 /indra/newview/llvlcomposition.cpp | |
| parent | b42b421d25f3b3a7ea4f571388acb64f98e1f51d (diff) | |
| parent | ccc72757ef23fa7ffba066e5bdaf05e3f8a95cca (diff) | |
merge.
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) |
