aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/linden/indra/llrender
diff options
context:
space:
mode:
authorJacek Antonelli2008-12-09 22:25:37 -0600
committerJacek Antonelli2008-12-09 22:25:41 -0600
commit22b861982f2efd5d16097a012627e73b9fb85834 (patch)
tree6152a84b92c682e271bdd52d46cd1728454f679a /linden/indra/llrender
parentSecond Life viewer sources 1.22.1-RC (diff)
downloadmeta-impy-22b861982f2efd5d16097a012627e73b9fb85834.zip
meta-impy-22b861982f2efd5d16097a012627e73b9fb85834.tar.gz
meta-impy-22b861982f2efd5d16097a012627e73b9fb85834.tar.bz2
meta-impy-22b861982f2efd5d16097a012627e73b9fb85834.tar.xz
Second Life viewer sources 1.22.2-RC
Diffstat (limited to '')
-rw-r--r--linden/indra/llrender/llimagegl.cpp2
-rw-r--r--linden/indra/llrender/llrender.cpp4
2 files changed, 5 insertions, 1 deletions
diff --git a/linden/indra/llrender/llimagegl.cpp b/linden/indra/llrender/llimagegl.cpp
index d9b22c5..a41b931 100644
--- a/linden/indra/llrender/llimagegl.cpp
+++ b/linden/indra/llrender/llimagegl.cpp
@@ -154,7 +154,7 @@ void LLImageGL::destroyGL(BOOL save_state)
154 LLImageGL* glimage = *iter; 154 LLImageGL* glimage = *iter;
155 if (glimage->mTexName && glimage->mComponents) 155 if (glimage->mTexName && glimage->mComponents)
156 { 156 {
157 if (save_state) 157 if (save_state && glimage->isInitialized())
158 { 158 {
159 glimage->mSaveData = new LLImageRaw; 159 glimage->mSaveData = new LLImageRaw;
160 glimage->readBackRaw(glimage->mCurrentDiscardLevel, glimage->mSaveData, false); 160 glimage->readBackRaw(glimage->mCurrentDiscardLevel, glimage->mSaveData, false);
diff --git a/linden/indra/llrender/llrender.cpp b/linden/indra/llrender/llrender.cpp
index 80fed06..a15f44a 100644
--- a/linden/indra/llrender/llrender.cpp
+++ b/linden/indra/llrender/llrender.cpp
@@ -190,6 +190,10 @@ bool LLTexUnit::bind(const LLImageGL* texture)
190 { 190 {
191 return texture->bindDefaultImage(mIndex); 191 return texture->bindDefaultImage(mIndex);
192 } 192 }
193 if (!texture->getTexName()) //if texture does not exist
194 {
195 return texture->bindDefaultImage(mIndex);
196 }
193 197
194 // Disabled caching of binding state. 198 // Disabled caching of binding state.
195 if (texture != NULL) 199 if (texture != NULL)