summaryrefslogtreecommitdiff
path: root/indra/newview/llviewertexture.cpp
diff options
context:
space:
mode:
authorRunitai <>2010-01-11 11:24:04 -0600
committerRunitai <>2010-01-11 11:24:04 -0600
commit78cb4204a471129a3f3486d33cf115de816de36c (patch)
treebd2d8ea33a1c9d8b2893a1e8efc480d5bb87dc3a /indra/newview/llviewertexture.cpp
parent2a00a16f57daf7c3f99b0374901c03644a5b5f1b (diff)
parentfddc7d856e420b24e67f1f20af7bc45817a1a8fb (diff)
Merge
Diffstat (limited to 'indra/newview/llviewertexture.cpp')
-rw-r--r--indra/newview/llviewertexture.cpp20
1 files changed, 15 insertions, 5 deletions
diff --git a/indra/newview/llviewertexture.cpp b/indra/newview/llviewertexture.cpp
index f825eaa8ab..1edaeec848 100644
--- a/indra/newview/llviewertexture.cpp
+++ b/indra/newview/llviewertexture.cpp
@@ -3007,7 +3007,7 @@ void LLViewerMediaTexture::addFace(LLFace* facep)
LLViewerTexture::addFace(facep) ;
const LLTextureEntry* te = facep->getTextureEntry() ;
- if(te)
+ if(te && te->getID().notNull())
{
LLViewerTexture* tex = gTextureList.findImage(te->getID()) ;
if(tex)
@@ -3024,7 +3024,10 @@ void LLViewerMediaTexture::addFace(LLFace* facep)
return ;
}
- llerrs << "The face does not have a valid texture before media texture." << llendl ;
+ if(te && te->getID().notNull()) //should have a texture
+ {
+ llerrs << "The face does not have a valid texture before media texture." << llendl ;
+ }
}
//virtual
@@ -3033,7 +3036,7 @@ void LLViewerMediaTexture::removeFace(LLFace* facep)
LLViewerTexture::removeFace(facep) ;
const LLTextureEntry* te = facep->getTextureEntry() ;
- if(te)
+ if(te && te->getID().notNull())
{
LLViewerTexture* tex = gTextureList.findImage(te->getID()) ;
if(tex)
@@ -3094,7 +3097,10 @@ void LLViewerMediaTexture::removeFace(LLFace* facep)
}
}
- llerrs << "mTextureList texture reference number is corrupted." << llendl ;
+ if(te && te->getID().notNull()) //should have a texture
+ {
+ llerrs << "mTextureList texture reference number is corrupted." << llendl ;
+ }
}
void LLViewerMediaTexture::stopPlaying()
@@ -3130,11 +3136,15 @@ void LLViewerMediaTexture::switchTexture(LLFace* facep)
const LLTextureEntry* te = facep->getTextureEntry() ;
if(te)
{
- LLViewerTexture* tex = gTextureList.findImage(te->getID()) ;
+ LLViewerTexture* tex = te->getID().notNull() ? gTextureList.findImage(te->getID()) : NULL ;
if(!tex && te->getID() != mID)//try parcel media.
{
tex = gTextureList.findImage(mID) ;
}
+ if(!tex)
+ {
+ tex = LLViewerFetchedTexture::sDefaultImagep ;
+ }
facep->switchTexture(tex) ;
}
}