summaryrefslogtreecommitdiff
path: root/indra/newview/llviewertexture.cpp
diff options
context:
space:
mode:
authorXiaohong Bao <bao@lindenlab.com>2009-07-16 23:22:18 +0000
committerXiaohong Bao <bao@lindenlab.com>2009-07-16 23:22:18 +0000
commit4b1ce391d4e9cd4139ffef65cf9071bed7f888d0 (patch)
tree30b757bae4ba33b091c9eb22cdd5a796e779ab8c /indra/newview/llviewertexture.cpp
parente0179932d1545afe13de8202ffa5175a928abe88 (diff)
make LLViewerTextureManager::staticCastToFetchedTexture to accept NULL pointer as input.
Diffstat (limited to 'indra/newview/llviewertexture.cpp')
-rw-r--r--indra/newview/llviewertexture.cpp5
1 files changed, 5 insertions, 0 deletions
diff --git a/indra/newview/llviewertexture.cpp b/indra/newview/llviewertexture.cpp
index 92e00e0cae..a949830dcf 100644
--- a/indra/newview/llviewertexture.cpp
+++ b/indra/newview/llviewertexture.cpp
@@ -156,6 +156,11 @@ LLViewerMediaTexture* LLViewerTextureManager::getMediaTexture(const LLUUID& id,
LLViewerFetchedTexture* LLViewerTextureManager::staticCastToFetchedTexture(LLViewerTexture* tex, BOOL report_error)
{
+ if(!tex)
+ {
+ return NULL ;
+ }
+
S8 type = tex->getType() ;
if(type == LLViewerTexture::FETCHED_TEXTURE || type == LLViewerTexture::LOD_TEXTURE)
{