From 4b1ce391d4e9cd4139ffef65cf9071bed7f888d0 Mon Sep 17 00:00:00 2001 From: Xiaohong Bao Date: Thu, 16 Jul 2009 23:22:18 +0000 Subject: make LLViewerTextureManager::staticCastToFetchedTexture to accept NULL pointer as input. --- indra/newview/llviewertexture.cpp | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'indra/newview/llviewertexture.cpp') 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) { -- cgit v1.2.3