diff options
| author | Rick Pasetto <rick@lindenlab.com> | 2009-11-19 09:28:35 -0800 |
|---|---|---|
| committer | Rick Pasetto <rick@lindenlab.com> | 2009-11-19 09:28:35 -0800 |
| commit | 51e640e5d753ac9dc005cd6827db77988a04b8fa (patch) | |
| tree | 85cb5fc6626626b42df6a425a0663a515ac5362c /indra/newview/llvlcomposition.cpp | |
| parent | d4ba73ed721fa0811474fc53300f560539d38018 (diff) | |
| parent | 3e46ee6274d04d91657da92953b167fe94eb7f59 (diff) | |
Merge from remote repo
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) |
