diff options
| author | Mark Palange (Mani) <palange@lindenlab.com> | 2009-11-16 18:19:43 -0800 |
|---|---|---|
| committer | Mark Palange (Mani) <palange@lindenlab.com> | 2009-11-16 18:19:43 -0800 |
| commit | d3b03c7f53388a4a43cbce7c5ab196ab469d4abd (patch) | |
| tree | 1199b9a925e21a2a8d82dcb2cf4ee91927d82f0b /indra/newview/llvlcomposition.cpp | |
| parent | 6e7d131e5800d921ec9bcf7b51f619256367fa55 (diff) | |
| parent | 27a555e443c98ce1a41ef21e6111bdfe903894e8 (diff) | |
Merge with viewer-2-0 changes
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) |
